Procházet zdrojové kódy

disable AutomaticCameraUploadInProgress for test

Marino Faggiana před 8 roky
rodič
revize
5d841133ca

+ 1 - 1
Picker/Info.plist

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

+ 1 - 1
PickerFileProvider/Info.plist

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

+ 1 - 1
Share Ext/Info.plist

@@ -21,7 +21,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>00014</string>
+	<string>00015</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 3 - 13
iOSClient/AppDelegate.m

@@ -348,16 +348,13 @@
     // 0.5 sec.
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
         
-        //
         NSLog(@"[LOG] Request Server Information");
-        //
+    
         if (_activeMain)
             [_activeMain requestServerInformation];
-        
-    });
     
-    // 1 sec.
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
+        NSLog(@"[LOG] Initialize Camera Upload");
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"initStateCameraUpload" object:nil];
         
         NSLog(@"[LOG] read file Offline");
         [[CCOfflineFileFolder sharedOfflineFileFolder] readFileOffline];
@@ -367,13 +364,6 @@
         
     });
     
-    // 1.5 sec.
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
-        
-        NSLog(@"[LOG] Initialize Camera Upload");
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"initStateCameraUpload" object:nil];
-    });
-    
     // Initialize Camera Upload
     //[[NSNotificationCenter defaultCenter] postNotificationName:@"initStateCameraUpload" object:@{@"afterDelay": @(2)}];
 }

+ 1 - 1
iOSClient/Info.plist

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

+ 19 - 24
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

@@ -35,7 +35,7 @@
     NSMutableArray *_queueMetadatas;
     NSMutableArray *_selectedMetadatas;
     NSUInteger _numSelectedMetadatas;
-    BOOL _AutomaticCameraUploadInProgress;      // START/STOP new request : initStateCameraUpload
+    //BOOL _AutomaticCameraUploadInProgress;      // START/STOP new request : initStateCameraUpload
     
     CCSectionDataSource *_sectionDataSource;
     
@@ -754,8 +754,8 @@
 
 - (void)initStateCameraUpload
 {
-    if (_AutomaticCameraUploadInProgress)
-        return;
+    //if (_AutomaticCameraUploadInProgress)
+    //    return;
     
     if([CCCoreData getCameraUploadActiveAccount:app.activeAccount]) {
         
@@ -1061,23 +1061,8 @@
         return;
     
     // STOP new request : initStateCameraUpload
-    _AutomaticCameraUploadInProgress = YES;
-    
-    NSString *folderPhotos = [CCCoreData getCameraUploadFolderNamePathActiveAccount:app.activeAccount activeUrl:app.activeUrl];
+    //_AutomaticCameraUploadInProgress = YES;
     
-    // verify/create folder Camera Upload, if error exit
-    if(![self createFolder:folderPhotos]) {
-        
-        // Full Upload ?
-        if (assetsFull)
-            [app messageNotification:@"_error_" description:NSLocalizedStringFromTable(@"_not_possible_create_folder_", @"Error", nil) visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeInfo];
-        
-        // START new request : initStateCameraUpload
-        _AutomaticCameraUploadInProgress = NO;
-        
-        return;
-    }
-
     // Disable idle timer
     [[UIApplication sharedApplication] setIdleTimerDisabled: YES];
         
@@ -1122,8 +1107,21 @@
         PHAsset *asset = [fetchResult firstObject];
         [newItemsPHAssetToUpload addObject:asset];
     }
+    
+    // verify/create folder Camera Upload, if error exit
+    if(![self createFolder:folderPhotos]) {
+        
+        // Full Upload ?
+        if (assetsFull)
+            [app messageNotification:@"_error_" description:NSLocalizedStringFromTable(@"_not_possible_create_folder_", @"Error", nil) visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeInfo];
         
-    // Use subfolders
+        // START new request : initStateCameraUpload
+        //_AutomaticCameraUploadInProgress = NO;
+        
+        return;
+    }
+    
+    // Use subfolders verify/create subfolder, if error exit
     if (createSubfolders) {
         
         for (NSString *dateSubFolder in [CCUtility createNameSubFolder:newItemsPHAssetToUpload]) {
@@ -1232,13 +1230,10 @@
     [_hud hideHud];
     
     // START new request : initStateCameraUpload
-    _AutomaticCameraUploadInProgress = NO;
+    //_AutomaticCameraUploadInProgress = NO;
     
     // Enable idle timer
     [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
-
-    // START new request : initStateCameraUpload
-    _AutomaticCameraUploadInProgress = NO;
 }
 
 @end