Marino Faggiana 7 anos atrás
pai
commit
cfa5432325

+ 0 - 5
iOSClient/AppDelegate.m

@@ -248,11 +248,6 @@
         [_activeMain readFileReloadFolder];
     }
     
-    // refresh Photos tab
-    if (_activePhotos) {
-        [_activePhotos reloadDatasourceForced];
-    }
-    
     // Initializations
     [self applicationInitialized];
 }

+ 2 - 5
iOSClient/Main/CCMain.m

@@ -380,7 +380,7 @@
         
         // Load photo datasorce
         if (appDelegate.activePhotos)
-            [appDelegate.activePhotos reloadDatasourceForced];
+            [appDelegate.activePhotos reloadDatasource];
         
         // remove all of detail
         if (appDelegate.activeDetail)
@@ -4146,10 +4146,7 @@
                                         
                                         // Clear data (old) Auto Upload
                                         [[NCManageDatabase sharedInstance] clearDateReadWithServerUrl:_autoUploadDirectory directoryID:nil];
-                                        
-                                        if (appDelegate.activeAccount.length > 0 && appDelegate.activePhotos)
-                                            [appDelegate.activePhotos reloadDatasourceForced];
-                                        
+                                                                                
                                         [self readFolder:serverUrl];
                                         
                                         NSLog(@"[LOG] Update Folder Photo");

+ 1 - 1
iOSClient/Photos/CCPhotos.h

@@ -43,7 +43,7 @@
 
 - (void)downloadFileSuccessFailure:(NSString *)fileName fileID:(NSString *)fileID serverUrl:(NSString *)serverUrl selector:(NSString *)selector selectorPost:(NSString *)selectorPost errorMessage:(NSString *)errorMessage errorCode:(NSInteger)errorCode;
 
-- (void)reloadDatasourceForced;
+- (void)reloadDatasource;
 - (void)readPhotoVideo;
 
 @end

+ 3 - 9
iOSClient/Photos/CCPhotos.m

@@ -453,12 +453,12 @@
                 
             } else {
                 
-                [self reloadDatasourceForced];
+                [self reloadDatasource];
             }
             
         } else {
             
-            [self reloadDatasourceForced];
+            [self reloadDatasource];
         }
     }
 }
@@ -560,7 +560,7 @@
             (void)[[NCManageDatabase sharedInstance] addMetadatas:addMetadatas serverUrl:metadataNet.serverUrl];
             dispatch_async(dispatch_get_main_queue(), ^{
                 _textTitleForEmptyDataSet = [NSString stringWithFormat:@"\n%@", NSLocalizedString(@"_tutorial_photo_view_", nil)];
-                [self reloadDatasourceForced];
+                [self reloadDatasource];
             });
         } else {
             dispatch_async(dispatch_get_main_queue(), ^{
@@ -587,12 +587,6 @@
 #pragma mark ==== Collection ====
 #pragma --------------------------------------------------------------------------------------------
 
-- (void)reloadDatasourceForced
-{
-    [CCSectionMetadata removeAllObjectsSectionDataSource:_sectionDataSource];
-    [self reloadDatasource];
-}
-
 - (void)reloadDatasource
 {    
     // test