瀏覽代碼

1.下载中断开时 再次进去改为自动下载

huangxiaodong 1 年之前
父節點
當前提交
ac2cac9f08

+ 9 - 3
创维盒子/双子星云手机/Class/Set/uploadFile/downLoadFile/downLoadPreviewViewController.m

@@ -555,6 +555,15 @@
     
 }
 
+- (void)viewWillDisappear:(BOOL)animated{
+    [super viewWillDisappear:animated];
+    
+    [self removeNewIndicator];
+//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(60.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//        [self removeNewIndicator];
+//    });
+}
+
 - (void)searchFileListFun
 {
     NSMutableDictionary *dict = [NSMutableDictionary new];
@@ -569,9 +578,6 @@
     
     [self showNewIndicatorWithCanBack:YES canTouch:NO];
     
-//    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(120.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-//        [self removeNewIndicator];
-//    });
 }
 
 - (void)searchFileListDoneFun:(NSNotification*)notification

+ 14 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.m

@@ -518,8 +518,21 @@
         NSMutableArray *curLoadIngArr = Arr[0];
         //不是上传视频和进来的  所以上传状态(上传中和等待)改为暂停
         if(![downloadManager shareInstance].isDownloadIngType){
+//            for (couldPhoneFileModel * curModel in curLoadIngArr) {
+//                curModel.curDownloadStateType = downloadStateSuspend;
+//            }
+            
+            //改为重新下载
+            NSMutableArray *handleDownloadArr = [NSMutableArray new];
             for (couldPhoneFileModel * curModel in curLoadIngArr) {
-                curModel.curDownloadStateType = downloadStateSuspend;
+                if(curModel.curDownloadStateType != downloadStateSuspend)
+                {
+                    [handleDownloadArr addObject:curModel];
+                }
+            }
+            
+            if(handleDownloadArr.count >0){
+                [[downloadManager shareInstance] reDownloadFileFunBy:handleDownloadArr withAll:NO];
             }
         }