Bläddra i källkod

Add Reload Favorite & Photo is active

Marino Faggiana 7 år sedan
förälder
incheckning
8cac705120
3 ändrade filer med 10 tillägg och 0 borttagningar
  1. 1 0
      iOSClient/Favorites/CCFavorites.h
  2. 8 0
      iOSClient/Main/CCMain.m
  3. 1 0
      iOSClient/Photos/CCPhotos.h

+ 1 - 0
iOSClient/Favorites/CCFavorites.h

@@ -56,5 +56,6 @@
 
 - (void)readListingFavorites;
 - (void)addFavoriteFolder:(NSString *)serverUrl;
+- (void)reloadDatasource;
 
 @end

+ 8 - 0
iOSClient/Main/CCMain.m

@@ -4726,6 +4726,14 @@
         return;
     }
     
+    // Reload Favorite & Photo is active
+    NSInteger indexActiveTabBar = self.tabBarController.selectedIndex;
+    if (indexActiveTabBar == k_tabBarApplicationIndexFavorite) {
+        app.activeFavorites.reloadDatasource;
+    } else if (indexActiveTabBar == k_tabBarApplicationIndexPhotos) {
+        app.activePhotos.reloadDatasource;
+    }
+    
     // Reload -> Self se non siamo nella dir appropriata cercala e se è in memoria reindirizza il reload
     if ([serverUrl isEqualToString:_serverUrl] == NO || _serverUrl == nil) {
         

+ 1 - 0
iOSClient/Photos/CCPhotos.h

@@ -45,6 +45,7 @@
 - (void)downloadFileSuccess:(tableMetadata *)metadata;
 - (void)downloadFileFailure:(NSInteger)errorCode;
 
+- (void)reloadDatasource;
 - (void)reloadDatasourceForced;
 
 @end