Bläddra i källkod

Merge Clear cached collection for uncat and hidden #834

Clear cached collection for uncat and hidden
Neeraj Gupta 2 år sedan
förälder
incheckning
dc97f5b8dc

+ 2 - 0
lib/services/collections_service.dart

@@ -159,6 +159,8 @@ class CollectionsService {
   void clearCache() {
     _localPathToCollectionID.clear();
     _collectionIDToCollections.clear();
+    cachedDefaultHiddenCollection = null;
+    cachedUncategorizedCollection = null;
     _cachedKeys.clear();
   }
 

+ 3 - 2
lib/ui/actions/collection/collection_sharing_actions.dart

@@ -302,8 +302,9 @@ class CollectionActions {
               await moveFilesFromCurrentCollection(bContext, collection, files);
               // collection should be empty on server now
               await collectionsService.trashEmptyCollection(collection);
-            } catch (e) {
-              logger.severe("Failed to keep photos and delete collection", e);
+            } catch (e, s) {
+              logger.severe(
+                  "Failed to keep photos and delete collection", e, s);
               rethrow;
             }
           },