Browse Source

clear code

Marino Faggiana 7 năm trước cách đây
mục cha
commit
d78acc333f

+ 0 - 1
iOSClient/AppDelegate.h

@@ -150,7 +150,6 @@
 - (void)changeTheming:(UIViewController *)vc;
 
 // Operation Networking
-- (void)cancelAllOperations;
 - (void)addNetworkingOperationQueue:(NSOperationQueue *)netQueue delegate:(id)delegate metadataNet:(CCMetadataNet *)metadataNet;
 
 @end

+ 0 - 5
iOSClient/AppDelegate.m

@@ -1292,11 +1292,6 @@
     });
 }
 
-- (void)cancelAllOperations
-{
-    [_netQueue cancelAllOperations];
-}
-
 - (void)addNetworkingOperationQueue:(NSOperationQueue *)netQueue delegate:(id)delegate metadataNet:(CCMetadataNet *)metadataNet
 {
     id operation;

+ 1 - 1
iOSClient/Main/CCMain.m

@@ -3381,7 +3381,7 @@
     [_ImageTitleHomeCryptoCloud setUserInteractionEnabled:NO];
     
     // STOP, erase all in  queue networking
-    [app cancelAllOperations];
+    [app.netQueue cancelAllOperations];
     [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:k_taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
 
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.2 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{

+ 2 - 2
iOSClient/Settings/CCAdvanced.m

@@ -316,7 +316,7 @@
     
     [[NCManageDatabase sharedInstance] clearTable:[tableQueueUpload class] account:app.activeAccount];
     
-    [app cancelAllOperations];
+    [app.netQueue cancelAllOperations];
     
     [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:k_taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
     
@@ -438,7 +438,7 @@
         
         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
             
-            [app cancelAllOperations];
+            [app.netQueue cancelAllOperations];
             [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:k_taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
             
             [[NSURLCache sharedURLCache] setMemoryCapacity:0];

+ 4 - 4
iOSClient/Settings/CCManageAccount.m

@@ -205,7 +205,7 @@
 {
     [self deselectFormRow:sender];
     
-    [app cancelAllOperations];
+    [app.netQueue cancelAllOperations];
     [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:k_taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
     
     // Brand
@@ -260,7 +260,7 @@
 {    
     [self deselectFormRow:sender];
     
-    [app cancelAllOperations];
+    [app.netQueue cancelAllOperations];
     [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:k_taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
     
     // Brand
@@ -314,7 +314,7 @@
 
 - (void)deleteAccount:(NSString *)account
 {
-    [app cancelAllOperations];
+    [app.netQueue cancelAllOperations];
     [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:k_taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
     
     [[NCManageDatabase sharedInstance] clearTable:[tableAccount class] account:account];
@@ -358,7 +358,7 @@
         return;
     }
 
-    [app cancelAllOperations];
+    [app.netQueue cancelAllOperations];
     [[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:k_taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
     
     // change account