Browse Source

1.备份相关

huangxiaodong 1 year ago
parent
commit
6004daeb05

+ 37 - 26
创维盒子/双子星云手机/Class/Set/uploadFile/photoView/backupsFilerecordTableView.m

@@ -13,7 +13,8 @@
 
 @interface backupsFilerecordTableView()<UITableViewDataSource,UITableViewDelegate,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
 {
-    
+    UIView* curTableHeadView;
+    UILabel *titleHeadLabel;
 }
 
 
@@ -44,6 +45,8 @@
         self.sectionHeaderTopPadding = 0;
     }
     
+    self.scrollEnabled = NO;
+    
     //空数据引入第三方开源处理
     self.emptyDataSetSource = self;
     self.emptyDataSetDelegate = self;
@@ -58,6 +61,33 @@
     [self reloadDataFun];
 }
 
+- (void)setTableViewHeadTitleFun
+{
+    if(_curDataArr.count == 0){
+        titleHeadLabel.text = @"";
+        return;
+    }
+    
+    photosBackupsTaskModel *model = _curDataArr.firstObject;
+    
+    NSString *text = @"";
+    if(model.curBackupsState == backupsStateUploading
+       ||model.curBackupsState == backupsStateSuspend){
+        text = NSLocalizedString(@"File_Transfer_List_head_title_ing",nil);
+        text = [[NSString alloc] initWithFormat:@"%@(%ld)",text,model.count - model.didBackupsCount - model.failCount];
+    }
+    else if(model.curBackupsState == backupsStateFail){
+        text = NSLocalizedString(@"File_Transfer_List_head_title_fail",nil);
+        text = [[NSString alloc] initWithFormat:@"%@(%ld)",text,model.didBackupsCount];
+    }
+    else{
+        text = NSLocalizedString(@"File_Transfer_List_head_title_done",nil);
+        text = [[NSString alloc] initWithFormat:@"%@(%ld)",text,model.didBackupsCount];
+    }
+
+    titleHeadLabel.text = text;
+}
+
 - (void)setCurDataArr:(NSArray *)curDataArr
 {
     _curDataArr = curDataArr;
@@ -132,33 +162,13 @@
 
     UIView* headView = [UIView new];
     headView.backgroundColor = [UIColor whiteColor];
-    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, SCREEN_W -15, 50)];
-    titleLabel.font = [UIFont systemFontOfSize:12.0];
-    titleLabel.textColor = [UIColor hwColor:@"#666666" alpha:1.0];
-    [headView addSubview:titleLabel];
+    titleHeadLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, SCREEN_W -15, 50)];
+    titleHeadLabel.font = [UIFont systemFontOfSize:12.0];
+    titleHeadLabel.textColor = [UIColor hwColor:@"#666666" alpha:1.0];
+    [headView addSubview:titleHeadLabel];
     
-    if(_curDataArr.count == 0){
-        return headView;
-    }
+    [self setTableViewHeadTitleFun];
     
-    photosBackupsTaskModel *model = _curDataArr.firstObject;
-    
-    NSString *text = @"";
-    if(model.curBackupsState == backupsStateUploading
-       ||model.curBackupsState == backupsStateSuspend){
-        text = NSLocalizedString(@"File_Transfer_List_head_title_ing",nil);
-        text = [[NSString alloc] initWithFormat:@"%@(%ld)",text,model.count - model.didBackupsCount - model.failCount];
-    }
-    else if(model.curBackupsState == backupsStateFail){
-        text = NSLocalizedString(@"File_Transfer_List_head_title_fail",nil);
-        text = [[NSString alloc] initWithFormat:@"%@(%ld)",text,model.didBackupsCount];
-    }
-    else{
-        text = NSLocalizedString(@"File_Transfer_List_head_title_done",nil);
-        text = [[NSString alloc] initWithFormat:@"%@(%ld)",text,model.didBackupsCount];
-    }
-
-    titleLabel.text = text;
     return headView;
 }
 
@@ -210,6 +220,7 @@
 
 -(void)reloadDataFun{
     mainBlock(^{
+        [self setTableViewHeadTitleFun];
         [self reloadData];
     });
 }

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

@@ -160,7 +160,7 @@
     }];
 
     _rightTableView.didLongPressClick = ^{
-        weakSelf.isEditType = YES;
+       // weakSelf.isEditType = YES;
     };
     
     _rightTableView.didClickReUploadBlock = ^(photosBackupsTaskModel* _Nonnull model) {

+ 2 - 4
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+backupsFile.m

@@ -85,10 +85,8 @@
                             if(self.curPhotosBackupsTaskMod.curUploadFileType == uploadFileTypeImage){
                                 
                                 if([fileLengthNum integerValue] == self.curPhotosBackupsTaskMod.totalBytes){
-                                    self.backupsTaskUid = nil;
-                                    
-                                    [[backupsFileManager shareInstance] getDataWrongToChangeFailFun];
-                                    HLog(@"hxd already 备份任务异常终止")
+                                    HLog(@"文件已备份");
+                                    [[backupsFileManager shareInstance] backupsFileDoneFun];
                                     return;
                                 }