Skip to content

armgit / ente

Public Imported from GitHub
0

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

Avoid adding empty albums in _getAlbumsWithFiles()

ashilkn129e9f8f49f9
diff --git a/mobile/lib/services/album_home_widget_service.dart b/mobile/lib/services/album_home_widget_service.dart
index 2f23ff1d52..056b6f19b1 100644
--- a/mobile/lib/services/album_home_widget_service.dart
+++ b/mobile/lib/services/album_home_widget_service.dart
@@ -371,8 +371,10 @@ class AlbumHomeWidgetService {
if (collection != null) {
final files =
await FilesDB.instance.getAllFilesCollection(collection.id);
- albumsWithFiles[collection.id] =
- (collection.decryptedName ?? "Album", files);
+ if (files.isNotEmpty) {
+ albumsWithFiles[collection.id] =
+ (collection.decryptedName ?? "Album", files);
+ }
}
}