|
@@ -33,7 +33,7 @@
|
|
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(downloadTaskFinishedNoti:) name:nasDownloadTaskFinishedNotification object:nil];
|
|
|
|
|
|
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(downloadTaskDownloadingNoti:) name:kDownloadTaskDownloadingNoti object:nil];
|
|
|
+ //[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(downloadTaskDownloadingNoti:) name:kDownloadTaskDownloadingNoti object:nil];
|
|
|
}
|
|
|
return self;
|
|
|
}
|
|
@@ -732,16 +732,46 @@
|
|
|
NSString * urlString = [item.downloadURL stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
|
|
//HLog(@"下载中:%lld --- %lld \n%@\n%@",downloadedSize,totalSize,urlString,_curShareFileDataModel.fileUrl);
|
|
|
|
|
|
+ boxDownloadFileRecordCell * curCell= nil;
|
|
|
+
|
|
|
for (ShareFileDataModel*model in _downloadingArr) {
|
|
|
if([model.fileUrl isEqualToString:urlString]){
|
|
|
//model.downloadBoxStateType = downloadBoxStateDownloadloading;
|
|
|
model.currentSize = item.downloadedSize;
|
|
|
model.curTimeInterval = [[NSDate date] timeIntervalSince1970];
|
|
|
+
|
|
|
+ NSArray *subViews = [self subviews];
|
|
|
+
|
|
|
+ for (boxDownloadFileRecordCell *cell in subViews) {
|
|
|
+ if([cell isKindOfClass:[boxDownloadFileRecordCell class]]){
|
|
|
+ ShareFileDataModel* preModel = cell.curShareFileDataModel;
|
|
|
+ if(preModel && [preModel.fileUrl isEqualToString:model.fileUrl]){
|
|
|
+ curCell = cell;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- [self reloadData];
|
|
|
+ //[self reloadData];
|
|
|
+ //[self reloadSections:[[NSIndexSet alloc] initWithIndex:0] withRowAnimation:UITableViewRowAnimationNone];
|
|
|
+
|
|
|
+ if(curCell){
|
|
|
+ NSIndexPath *index = [self indexPathForCell:curCell];
|
|
|
+ if(index){
|
|
|
+ [self reloadRowsAtIndexPaths:@[index] withRowAnimation:UITableViewRowAnimationNone];
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ [self reloadData];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ [self reloadData];
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|