Merge Clear cached collection for uncat and hidden #834

Clear cached collection for uncat and hidden
This commit is contained in:
Neeraj Gupta 2023-02-01 17:39:01 +05:30 committed by GitHub
commit dc97f5b8dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;
}
},