Marino Faggiana 7 years ago
parent
commit
6a40774210
2 changed files with 3 additions and 6 deletions
  1. 1 1
      iOSClient/Networking/NCService.swift
  2. 2 5
      iOSClient/Photos/CCPhotos.m

+ 1 - 1
iOSClient/Networking/NCService.swift

@@ -235,8 +235,8 @@ class NCService: NSObject, OCNetworkingDelegate {
             appDelegate.settingActiveAccount(tableAccount.account, activeUrl: tableAccount.url, activeUser: tableAccount.user, activeUserID: tableAccount.userID, activePassword: tableAccount.password)
             
             // Call func thath required the userdID
-            appDelegate.activePhotos.readPhotoVideo()
             appDelegate.activeFavorites.readListingFavorites()
+            appDelegate.activePhotos.readPhotoVideo()
             
             DispatchQueue.global(qos: .default).async {
                 

+ 2 - 5
iOSClient/Photos/CCPhotos.m

@@ -548,15 +548,12 @@
         // Update date
         [[NCManageDatabase sharedInstance] setAccountDateSearchContentTypeImageVideo:[NSDate date]];
         
-        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
             
             NSMutableArray *addMetadatas = [NSMutableArray new];
 
             // DELETE RECORD IF NOT PRESENT ON DB
-            NSArray *metadatasDBImageVideo = [[NCManageDatabase sharedInstance] getTableMetadatasContentTypeImageVideo];
-            for (tableMetadata *metadata in metadatasDBImageVideo) {
-            }
-            
+           
             // INSERT NEW RECORD ON DB
             for (tableMetadata *metadata in metadatas) {