Skip to content

armgit / ente

Public Imported from GitHub
0

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

[web][photos] Hide empty favorites album from collection bar

Anand Baburajanc10233fc70c3
diff --git a/web/packages/new/photos/components/gallery/reducer.ts b/web/packages/new/photos/components/gallery/reducer.ts
index 4f2d806883..b56d74f0d7 100644
--- a/web/packages/new/photos/components/gallery/reducer.ts
+++ b/web/packages/new/photos/components/gallery/reducer.ts
@@ -1582,6 +1582,12 @@ const createCollectionSummaries = (
}
const collectionFiles = filesByCollection.get(collection.id);
+
+ // Hide empty favorites from collection bar
+ if (type == "userFavorites" && !collectionFiles?.length) {
+ attributes.add("hideFromCollectionBar");
+ }
+
collectionSummaries.set(collection.id, {
id: collection.id,
type,