Browse Source

small modify code

Marino Faggiana 7 years ago
parent
commit
7c118cea5c
1 changed files with 3 additions and 5 deletions
  1. 3 5
      iOSClient/AppDelegate.m

+ 3 - 5
iOSClient/AppDelegate.m

@@ -1258,6 +1258,9 @@
 {
     NSLog(@"[LOG] Start perform Fetch With Completion Handler");
     
+    // verify Upload
+    [self verifyUploadInErrorOrWait];
+    
     // Verify new photo
     [[NCAutoUpload sharedInstance] initStateAutoUpload];
     
@@ -1533,11 +1536,6 @@
         counterUploadInSessionAndInLock = [[[NCManageDatabase sharedInstance] getTableMetadataUpload] count] + [[[NCManageDatabase sharedInstance] getTableMetadataUploadWWan] count] + [[[NCManageDatabase sharedInstance] getLockQueueUpload] count];
     }
     
-    // In background verify Upload in error
-    if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) {
-        [self verifyUploadInErrorOrWait];
-    }
-    
     // Start Timer
     _timerProcessAutoDownloadUpload = [NSTimer scheduledTimerWithTimeInterval:k_timerProcessAutoDownloadUpload target:self selector:@selector(processAutoDownloadUpload) userInfo:nil repeats:YES];
 }