Skip to content

armgit / ente

Public Imported from GitHub
0

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

[web][photos] Simplify Links sorting and filtering

AswinAsok105c8fa6daa7
diff --git a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
index b13b2732d9..1e406419a1 100644
--- a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
+++ b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
@@ -159,10 +159,8 @@ export const GalleryBarAndListHeader: React.FC<
sortCollectionSummaries(
[...toShowCollectionSummaries.values()],
collectionsSortBy,
- ).sort((a, b) =>
- mode == "links" ? 0 : b.sortPriority - a.sortPriority,
- ),
- [collectionsSortBy, toShowCollectionSummaries, mode],
+ ).sort((a, b) => b.sortPriority - a.sortPriority),
+ [collectionsSortBy, toShowCollectionSummaries],
);
const eligibleCollectionSummaries = useMemo(
() =>
@@ -172,12 +170,10 @@ export const GalleryBarAndListHeader: React.FC<
cs.id !== PseudoCollectionID.hiddenItems &&
cs.id !== PseudoCollectionID.archiveItems &&
cs.id !== PseudoCollectionID.trash &&
- (mode == "links"
- ? true
- : mode == "albums"
- ? !cs.attributes.has("system") ||
- (cs.id > 0 && cs.type == "uncategorized")
- : !cs.attributes.has("hideFromCollectionBar")),
+ (mode == "albums"
+ ? !cs.attributes.has("system") ||
+ (cs.id > 0 && cs.type == "uncategorized")
+ : !cs.attributes.has("hideFromCollectionBar")),
),
[sortedCollectionSummaries, uncategorizedCollectionSummaryID, mode],
);