Browse Source

Clear code

Marino Faggiana 8 years ago
parent
commit
83ca434477

+ 20 - 28
iOSClient/AppDelegate.m

@@ -1246,8 +1246,27 @@
     }
     
     // verify Lock pending
-    [self verifyLockTableAutomaticUpload];
+    NSArray *UploadAutomaticInQueue = [self verifyExistsInQueuesUploadSelector:selectorUploadAutomatic];
+    NSArray *UploadAutomaticAllInQueue = [self verifyExistsInQueuesUploadSelector:selectorUploadAutomaticAll];
+    NSMutableArray *UploadInQueue = [NSMutableArray new];
+    [UploadInQueue addObjectsFromArray:UploadAutomaticInQueue];
+    [UploadInQueue addObjectsFromArray:UploadAutomaticAllInQueue];
+
+    NSArray *recordAutomaticUploadInLock = [CCCoreData getAllLockTableAutomaticUploadForAccount:_activeAccount];
     
+    for (TableAutomaticUpload *tableAutomaticUpload in recordAutomaticUploadInLock) {
+        
+        BOOL recordFound = NO;
+        
+        for (CCMetadataNet *metadataNet in UploadInQueue) {
+            if (metadataNet.identifier == tableAutomaticUpload.identifier)
+                recordFound = YES;
+        }
+        
+        if (!recordFound)
+            [CCCoreData unlockTableAutomaticUploadForAccount:_activeAccount identifier:tableAutomaticUpload.identifier];
+    }
+
     // Verify num error if selectorUploadAutomaticAll
     if ([selector isEqualToString:selectorUploadAutomaticAll]) {
     
@@ -1309,30 +1328,6 @@
     }
 }
 
-- (void)verifyLockTableAutomaticUpload
-{
-    NSArray *UploadAutomaticInQueue = [self verifyExistsInQueuesUploadSelector:selectorUploadAutomatic];
-    NSArray *UploadAutomaticAllInQueue = [self verifyExistsInQueuesUploadSelector:selectorUploadAutomaticAll];
-    NSMutableArray *UploadInQueue = [NSMutableArray new];
-    [UploadInQueue addObjectsFromArray:UploadAutomaticInQueue];
-    [UploadInQueue addObjectsFromArray:UploadAutomaticAllInQueue];
-    
-    NSArray *recordAutomaticUploadInLock = [CCCoreData getAllLockTableAutomaticUploadForAccount:_activeAccount];
-    
-    for (TableAutomaticUpload *tableAutomaticUpload in recordAutomaticUploadInLock) {
-        
-        BOOL recordFound = NO;
-        
-        for (CCMetadataNet *metadataNet in UploadInQueue) {
-            if (metadataNet.identifier == tableAutomaticUpload.identifier)
-                recordFound = YES;
-        }
-        
-        if (!recordFound)
-            [CCCoreData unlockTableAutomaticUploadForAccount:_activeAccount identifier:tableAutomaticUpload.identifier];
-    }
-}
-
 - (void)verifyDownloadUploadInProgress
 {
     BOOL callVerifyDownload = NO;
@@ -1360,9 +1355,6 @@
             
             [self.timerVerifySessionInProgress invalidate];
         }
-        
-        // Verify Lock in Table Automatic Upload
-        //[self verifyLockTableAutomaticUpload];
     }
 }
 

+ 1 - 1
iOSClient/Brand/Picker.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.17</string>
 	<key>CFBundleVersion</key>
-	<string>00037</string>
+	<string>00038</string>
 	<key>NSExtension</key>
 	<dict>
 		<key>NSExtensionAttributes</key>

+ 1 - 1
iOSClient/Brand/PickerFileProvider.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.17</string>
 	<key>CFBundleVersion</key>
-	<string>00037</string>
+	<string>00038</string>
 	<key>NSExtension</key>
 	<dict>
 		<key>NSExtensionFileProviderDocumentGroup</key>

+ 1 - 1
iOSClient/Brand/Share.plist

@@ -19,7 +19,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>2.17</string>
 	<key>CFBundleVersion</key>
-	<string>00037</string>
+	<string>00038</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 1 - 1
iOSClient/Brand/iOSClient.plist

@@ -69,7 +69,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>00037</string>
+	<string>00038</string>
 	<key>ITSAppUsesNonExemptEncryption</key>
 	<true/>
 	<key>ITSEncryptionExportComplianceCode</key>