Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

move the collection.type == CollectionType.favorites check before isEmptyCollection check to handle the case where favourite collection is empty

Aman Raj Singh Mouryade2924630459
diff --git a/mobile/lib/ui/viewer/actions/album_selection_action_widget.dart b/mobile/lib/ui/viewer/actions/album_selection_action_widget.dart
index f75b8358ba..3dbc5af928 100644
--- a/mobile/lib/ui/viewer/actions/album_selection_action_widget.dart
+++ b/mobile/lib/ui/viewer/actions/album_selection_action_widget.dart
@@ -174,6 +174,9 @@ class _AlbumSelectionActionWidgetState
final List errors = [];
for (final collection in widget.selectedAlbums.albums) {
+ if (collection.type == CollectionType.favorites) {
+ continue;
+ }
count = await FilesDB.instance.collectionFileCount(collection.id);
final bool isEmptyCollection = count == 0;
if (isEmptyCollection) {
@@ -183,8 +186,6 @@ class _AlbumSelectionActionWidgetState
_logger.warning("failed to trash collection", e, s);
errors.add(e);
}
- } else if (collection.type == CollectionType.favorites) {
- continue;
} else {
nonEmptyCollection.add(collection);
}