Clear cached collection for uncat and hidden

This commit is contained in:
Neeraj Gupta 2023-02-01 15:40:58 +05:30
parent cf9e0e4ca7
commit d6b5259406
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1
2 changed files with 5 additions and 2 deletions

View file

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

View file

@ -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;
}
},