marinofaggiana 4 лет назад
Родитель
Сommit
da7c575089
2 измененных файлов с 10 добавлено и 13 удалено
  1. 1 1
      Cartfile.resolved
  2. 9 12
      iOSClient/AppDelegate.m

+ 1 - 1
Cartfile.resolved

@@ -20,7 +20,7 @@ github "marinofaggiana/AFNetworking" "2967678c3e0e98c9b8d7e06222ad12d1f49c26f2"
 github "marinofaggiana/KTVHTTPCache" "2.0.2"
 github "marinofaggiana/TOPasscodeViewController" "0.0.7"
 github "marinofaggiana/XLForm" "eb9381ad8129f60402bf412250fb31b95a628a08"
-github "nextcloud/ios-communication-library" "baa27749b901aad2c95d5ecae7a3a1304e7b605e"
+github "nextcloud/ios-communication-library" "80a64ad950bc5021b5e93918948b21f392f7c872"
 github "realm/realm-cocoa" "v5.0.3"
 github "rechsteiner/Parchment" "v1.7.0"
 github "scenee/FloatingPanel" "v1.7.5"

+ 9 - 12
iOSClient/AppDelegate.m

@@ -228,9 +228,6 @@
         [[NCService shared] middlewarePing];
     }
 
-    // verify delete Asset Local Identifiers in auto upload (Photos album)
-    [[NCUtility sharedInstance] deleteAssetLocalIdentifiersWithAccount:self.activeAccount sessionSelector:selectorUploadAutoUpload];
-   
     // Brand
     #if defined(HC)
     tableAccount *account = [[NCManageDatabase sharedInstance] getAccountActive];
@@ -706,14 +703,9 @@
 
 - (void)uploadedFile:(NSNotification *)notification
 {
-    NSDictionary *userInfo = notification.userInfo;
-    tableMetadata *metadata = userInfo[@"metadata"];
-    NSInteger errorCode = [userInfo[@"errorCode"] integerValue];
-   
-    if (errorCode == 0) {
-        // verify delete Asset Local Identifiers in auto upload (Photos album)
-        [[NCUtility sharedInstance] deleteAssetLocalIdentifiersWithAccount:metadata.account sessionSelector:selectorUploadAutoUpload];
-    }
+//    NSDictionary *userInfo = notification.userInfo;
+//    tableMetadata *metadata = userInfo[@"metadata"];
+//    NSInteger errorCode = [userInfo[@"errorCode"] integerValue];
 }
 
 #pragma --------------------------------------------------------------------------------------------
@@ -1118,7 +1110,6 @@
     
     NSArray *metadatasUpload = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"status == %d OR status == %d", k_metadataStatusInUpload, k_metadataStatusUploading] sorted:nil ascending:true];
     
-    // E2EE only 1
     for(tableMetadata *metadata in metadatasUpload) {
         if ([CCUtility isFolderEncrypted:metadata.serverUrl e2eEncrypted:metadata.e2eEncrypted account:metadata.account]) return;
     }
@@ -1299,6 +1290,12 @@
         }
     }
     
+    // verify delete Asset Local Identifiers in auto upload (Photos album)
+    if (counterUpload == 0 && self.passcodeViewController == nil) {
+        
+        [[NCUtility sharedInstance] deleteAssetLocalIdentifiersWithAccount:self.activeAccount sessionSelector:selectorUploadAutoUpload];
+    }
+    
     // Start Timer
     _timerProcessAutoUpload = [NSTimer scheduledTimerWithTimeInterval:k_timerProcessAutoUpload target:self selector:@selector(loadAutoUpload) userInfo:nil repeats:YES];
 }