Skip to content

armgit / ente

Public Imported from GitHub
0

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

Sort well

vishnukvmdee393744bf38
diff --git a/web/apps/locker/src/components/ItemList.tsx b/web/apps/locker/src/components/ItemList.tsx
index c96649746e..9390a81e53 100644
--- a/web/apps/locker/src/components/ItemList.tsx
+++ b/web/apps/locker/src/components/ItemList.tsx
@@ -56,6 +56,7 @@ import {
getItemTitle,
hasDownloadableObject,
isImportantCollection,
+ sortLockerCollections,
visibleLockerCollections,
} from "types";
import { ItemCard } from "./ItemCard";
@@ -158,8 +159,13 @@ export const ItemList: React.FC<ItemListProps> = ({
const [feedbackMessage, setFeedbackMessage] = useState<string | null>(null);
const displayCollections = useMemo(
- () => uniqueCollectionsByID(visibleLockerCollections(collections)),
- [collections],
+ () =>
+ uniqueCollectionsByID(
+ isCollectionsView
+ ? sortLockerCollections(collections)
+ : visibleLockerCollections(collections),
+ ),
+ [collections, isCollectionsView],
);
const allItems = useMemo(() => {
const itemsByID = new Map<number, LockerItem>();