Skip to content

armgit / ente

Public Imported from GitHub
0

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

[web][photos] Reuse album sorting preference for Links

AswinAsoke6890dcd9b9b
diff --git a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
index ff7b853f39..b13b2732d9 100644
--- a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
+++ b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
@@ -151,16 +151,8 @@ export const GalleryBarAndListHeader: React.FC<
collectionShareVisibilityProps.onClose();
}, [collectionShareVisibilityProps]);
- const [albumSortBy, setAlbumSortBy] =
+ const [collectionsSortBy, setCollectionsSortBy] =
useCollectionsSortByLocalState("updation-time-desc");
- const [linksSortBy, setLinksSortBy] =
- useState<CollectionsSortBy>("updation-time-desc");
- const collectionsSortBy = mode == "links" ? linksSortBy : albumSortBy;
- const setCollectionsSortBy =
- mode == "links" ? setLinksSortBy : setAlbumSortBy;
- useEffect(() => {
- if (mode == "links") setLinksSortBy("updation-time-desc");
- }, [mode]);
const sortedCollectionSummaries = useMemo(
() =>