From d6b525940627aed0ce439398454555a840725145 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Wed, 1 Feb 2023 15:40:58 +0530 Subject: [PATCH] Clear cached collection for uncat and hidden --- lib/services/collections_service.dart | 2 ++ lib/ui/actions/collection/collection_sharing_actions.dart | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/services/collections_service.dart b/lib/services/collections_service.dart index 9fb0e0b77..769282cd1 100644 --- a/lib/services/collections_service.dart +++ b/lib/services/collections_service.dart @@ -159,6 +159,8 @@ class CollectionsService { void clearCache() { _localPathToCollectionID.clear(); _collectionIDToCollections.clear(); + cachedDefaultHiddenCollection = null; + cachedUncategorizedCollection = null; _cachedKeys.clear(); } diff --git a/lib/ui/actions/collection/collection_sharing_actions.dart b/lib/ui/actions/collection/collection_sharing_actions.dart index 1eff29b6f..68bb6e212 100644 --- a/lib/ui/actions/collection/collection_sharing_actions.dart +++ b/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; } },