Quellcode durchsuchen

传输列表---样式及文案优化

huangxiaodong vor 11 Monaten
Ursprung
Commit
cba6a7a13f

+ 1 - 0
创维盒子/双子星云手机/Class/Set/previewFile/addAudioToPlayListViewController.m

@@ -617,6 +617,7 @@
         
     } failure:^(NSError * _Nonnull error) {
         [weakSelf removeNewIndicatorHaveStr];
+        [[iToast makeText:NSLocalizedString(@"netWork_error_show_tip",nil)] show];
     }];
 }
 

+ 1 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewAudioOrDocumentViewController.m

@@ -855,6 +855,7 @@
         
     } failure:^(NSError * _Nonnull error) {
         [weakSelf removeNewIndicatorHaveStr];
+        [[iToast makeText:NSLocalizedString(@"netWork_error_show_tip",nil)] show];
     }];
 }
 

+ 1 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewFileAndFolderSecondViewController.m

@@ -650,6 +650,7 @@
         
     } failure:^(NSError * _Nonnull error) {
         [weakSelf removeNewIndicatorHaveStr];
+        [[iToast makeText:NSLocalizedString(@"netWork_error_show_tip",nil)] show];
     }];
 }
 

+ 1 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewFileAndFolderViewController.m

@@ -877,6 +877,7 @@
         
     } failure:^(NSError * _Nonnull error) {
         [weakSelf removeNewIndicatorHaveStr];
+        [[iToast makeText:NSLocalizedString(@"netWork_error_show_tip",nil)] show];
     }];
 }
 

+ 2 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewImageOrVideoViewController.m

@@ -944,6 +944,8 @@
         [weakSelf.dataCollectionView    reloadData];
     } failure:^(NSError * _Nonnull error) {
         [weakSelf removeNewIndicatorHaveStr];
+        
+        [[iToast makeText:NSLocalizedString(@"netWork_error_show_tip",nil)] show];
     }];
 }
 

+ 35 - 12
创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/receiveSaveRecordTableView.m

@@ -157,7 +157,7 @@
             };
             
             cell.didTapPressClick = ^{
-                [weakSelf didClickReSaveByOne:model];
+                [weakSelf didClickReSaveByOne:model withRefreshType:YES];
             };
 
         }
@@ -280,8 +280,8 @@
         //headView.backgroundColor = [UIColor greenColor];
 
         NSString *leftStr =  NSLocalizedString(@"box_receive_Record_receiveing",nil);
-        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_all_suspend",nil);
-        NSString *rightSelectStr =  NSLocalizedString(@"File_upload_Record_all_open",nil);
+        //NSString *rightStr =  NSLocalizedString(@"File_upload_Record_all_suspend",nil);
+        //NSString *rightSelectStr =  NSLocalizedString(@"File_upload_Record_all_open",nil);
         NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSaveingArr.count];
 
         _boxSaveingHeadView.titleLabel.text = titleStr;
@@ -301,12 +301,13 @@
         //headView.backgroundColor = [UIColor greenColor];
 
         NSString *leftStr =  NSLocalizedString(@"box_receive_Record_fail",nil);
-        //NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
+        NSString *rightStr =  NSLocalizedString(@"box_save_fail_reSave_All",nil);
         NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSavefailArr.count];
 
          _failHeadView.titleLabel.text = titleStr;
+        [_failHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
         //[_failHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
-        _failHeadView.rightButton.hidden = YES;
+        //_failHeadView.rightButton.hidden = YES;
         
         _failHeadView.didClickButFun = ^{
             [weakSelf didClickRightButtonFun:2];
@@ -336,8 +337,12 @@
 #pragma mark 点击头部右边按钮
 - (void)didClickRightButtonFun:(NSInteger)section
 {
-    if(_didClickSectionHeadViewRightButton){
-        _didClickSectionHeadViewRightButton(section);
+//    if(_didClickSectionHeadViewRightButton){
+//        _didClickSectionHeadViewRightButton(section);
+//    }
+    
+    if(section == 2){
+        [self didClickAllReSaveFun];
     }
 }
 
@@ -366,7 +371,7 @@
 
      if(_failHeadView){
         NSString *leftStr =  NSLocalizedString(@"box_receive_Record_fail",nil);
-        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
+        NSString *rightStr =  NSLocalizedString(@"box_save_fail_reSave_All",nil);
         NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSavefailArr.count];
 
          _failHeadView.titleLabel.text = titleStr;
@@ -497,8 +502,25 @@
     
 }
 
+#pragma mark 单个全部重试
+- (void)didClickAllReSaveFun
+{
+    NSArray *curFailArr = [_boxSavefailArr copy];
+    
+    BOOL isRefreshType = NO;
+    for (int i=0; i<curFailArr.count; i++) {
+        if(i == curFailArr.count -1){
+            isRefreshType = YES;
+        }
+        
+        ShareFileDataModel*dataModel = curFailArr[i];
+        [self didClickReSaveByOne:dataModel withRefreshType:isRefreshType];
+    }
+    
+}
+
 #pragma mark 单个点击选中 重新保存
-- (void)didClickReSaveByOne:(ShareFileDataModel*)dataModel
+- (void)didClickReSaveByOne:(ShareFileDataModel*)dataModel withRefreshType:(BOOL)isRefreshType
 {
     NSMutableDictionary*paraDict = [NSMutableDictionary new];
     
@@ -524,16 +546,17 @@
         [SVProgressHUD dismiss];
         SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
         if(model && model.status == 0){
-            [weakSelf updatAfterReSaveFunByOne:dataModel];
+            [weakSelf updatAfterReSaveFunByOne:dataModel withRefreshType:isRefreshType];
         }
         
     } failure:^(NSError * _Nonnull error) {
         [SVProgressHUD dismiss];
+        [[iToast makeText:NSLocalizedString(@"netWork_error_show_tip",nil)] show];
     }];
 }
 
 #pragma mark 重新保存更新数据
-- (void)updatAfterReSaveFunByOne:(ShareFileDataModel*)dataModel
+- (void)updatAfterReSaveFunByOne:(ShareFileDataModel*)dataModel withRefreshType:(BOOL)isRefreshType
 {
     //删除数据 内存数据处理
     [_boxSavefailArr removeObject:dataModel];
@@ -554,7 +577,7 @@
         }];
         
         [weakSelf RefreshAllDataFun];
-        if(self->_didClickReSaveBlock){
+        if(self->_didClickReSaveBlock && isRefreshType){
             self->_didClickReSaveBlock(dataModel);
         }
     });

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

@@ -232,6 +232,7 @@
         
     } failure:^(NSError * _Nonnull error) {
         [weakSelf PollingCheckSaveFileToBoxStateFun];
+        [[iToast makeText:NSLocalizedString(@"netWork_error_show_tip",nil)] show];
     }];
 }
 

+ 1 - 0
创维盒子/双子星云手机/NAS/NasPreviewVideoViewController.m

@@ -834,6 +834,7 @@
         
     } failure:^(NSError * _Nonnull error) {
         [weakSelf removeNewIndicatorHaveStr];
+        [[iToast makeText:NSLocalizedString(@"netWork_error_show_tip",nil)] show];
     }];
 }
 

+ 2 - 0
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -583,3 +583,5 @@
 "share_download_notData_Tips" = "分享文件下载到真机的任务进度在这里展示";
 "share_save_notData_Tips" = "分享文件保存到Private- X的任务进度在这里展示";
 "box_receive_file_did_saveing"   = "已保存";
+"box_save_fail_reSave_All"   = "全部重试";
+"netWork_error_show_tip"   = "网络异常,请稍后再试!";