ソースを参照

1.显示优化

huangxiaodong 1 年間 前
コミット
562f2c655c

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

@@ -355,7 +355,9 @@
     }
     else if(_selectIndex == 3){
         //没有操作
-        [SVProgressHUD dismiss];
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            [SVProgressHUD dismiss];
+        });
     }
 }
 

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

@@ -258,7 +258,8 @@
             NSTimeInterval  timers = _curPhotosBackupsTaskModel.curTimeInterval - _curPhotosBackupsTaskModel.preTimeInterval;
             
             if(timers > 0){
-                long speed= 1*1024*1024 / timers;
+                //long speed= 1*1024*1024 / timers;
+                long speed= EachPieceSzie / timers;
                 NSString * speedStr = nil;
                 NSInteger speed_k = speed / (1024);
                 if(speed_k < 1024){

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

@@ -306,7 +306,10 @@
             NSTimeInterval  timers = curCouldPhoneFileModel.curTimeInterval - curCouldPhoneFileModel.preTimeInterval;
             
             if(timers > 0){
-                long speed= 1*1024*1024 / timers;
+                //long speed= 1*1024*1024 / timers;
+                
+                long speed= (curCouldPhoneFileModel.didDownloadBytes - curCouldPhoneFileModel.preDownloadBytes) / timers;
+                
                 NSString * speedStr = nil;
                 NSInteger speed_k = speed / (1024);
                 if(speed_k < 1024){
@@ -321,6 +324,7 @@
         }
         
         curCouldPhoneFileModel.preTimeInterval = curCouldPhoneFileModel.curTimeInterval;
+        curCouldPhoneFileModel.preDownloadBytes = curCouldPhoneFileModel.didDownloadBytes;
     }
     else if(curCouldPhoneFileModel.curDownloadStateType == downloadStateSuspend){
         [_upLoadStateButton setImage:[UIImage imageNamed:@"uploadFile_start"] forState:UIControlStateNormal];

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

@@ -435,7 +435,9 @@
 #pragma mark 单个点击选中后删除
 - (void)deleteModelOneByOneFun{
     if(!_selectModelArr || _selectModelArr.count==0){
-        [SVProgressHUD dismiss];
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            [SVProgressHUD dismiss];
+        });
         return;
     }
     

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

@@ -272,7 +272,9 @@
             NSTimeInterval  timers = curUploadFileDataModel.curTimeInterval - curUploadFileDataModel.preTimeInterval;
             
             if(timers > 0){
-                long speed= 1*1024*1024 / timers;
+                //long speed= 1*1024*1024 / timers;
+                long speed= EachPieceSzie / timers;
+                
                 NSString * speedStr = nil;
                 NSInteger speed_k = speed / (1024);
                 if(speed_k < 1024){

+ 4 - 2
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileView/uploadFileRecordTableView.m

@@ -436,14 +436,16 @@
 #pragma mark 单个点击选中后删除
 - (void)deleteModelOneByOneFun{
     if(!_selectModelArr || _selectModelArr.count==0){
-        [SVProgressHUD dismiss];
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            [SVProgressHUD dismiss];
+        });
         return;
     }
     
     KWeakSelf
     [[uploadFileManager shareInstance] deleteUploadFileRecordBy:_selectModelArr withDelCache:YES complete:^(BOOL isSuccess) {
         HLog(@"isSuccess:%d",isSuccess);
-        mainBlock(^{
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
             [SVProgressHUD dismiss];
         });
         if(isSuccess){

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

@@ -514,7 +514,7 @@
             }
             
             if(isLast){
-                mainBlock(^{
+                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                     [SVProgressHUD dismiss];
                 });
             }
@@ -542,7 +542,7 @@
              }
                 
                 if(isLast){
-                    mainBlock(^{
+                    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                         [SVProgressHUD dismiss];
                     });
                 }