Marino Faggiana 8 years ago
parent
commit
8e738f1f69
1 changed files with 12 additions and 10 deletions
  1. 12 10
      iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

+ 12 - 10
iOSClient/PhotosCameraUpload/CCPhotosCameraUpload.m

@@ -1126,7 +1126,15 @@
     // Create the folder for Photos & if request the subfolders
     // Create the folder for Photos & if request the subfolders
     if(![app createFolderSubFolderAutomaticUploadFolderPhotos:folderPhotos useSubFolder:useSubFolder assets:newItemsPHAssetToUpload selector:selectorUploadAutomaticAll]) {
     if(![app createFolderSubFolderAutomaticUploadFolderPhotos:folderPhotos useSubFolder:useSubFolder assets:newItemsPHAssetToUpload selector:selectorUploadAutomaticAll]) {
             
             
-        [self endLoadingAssets];
+        // end loading
+        [_hud hideHud];
+        
+        // START
+        app.automaticCheckAssetInProgress = NO;
+        
+        // Enable idle timer
+        [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
+        
         return;
         return;
     }
     }
     
     
@@ -1180,14 +1188,6 @@
     }
     }
     
     
     // end loading
     // end loading
-    [self endLoadingAssets];
-    
-    // Update icon badge number
-    [app updateApplicationIconBadgeNumber];
-}
-
--(void)endLoadingAssets
-{
     [_hud hideHud];
     [_hud hideHud];
     
     
     // START
     // START
@@ -1296,8 +1296,10 @@
         // Update Camera Upload data
         // Update Camera Upload data
         if ([metadataNet.selector isEqualToString:selectorUploadAutomatic])
         if ([metadataNet.selector isEqualToString:selectorUploadAutomatic])
             [CCCoreData setCameraUploadDateAssetType:assetMediaType assetDate:assetDate activeAccount:appDelegate.activeAccount];
             [CCCoreData setCameraUploadDateAssetType:assetMediaType assetDate:assetDate activeAccount:appDelegate.activeAccount];
+        
+        // Update icon badge number
+        [app updateApplicationIconBadgeNumber];
     });
     });
-
 }
 }
 
 
 @end
 @end