Skip to content

armgit / ente

Public Imported from GitHub
0

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

Rearrange

Manav Rathiea9f7dc54ca3
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index 3853810be4..75b1145dbd 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -541,17 +541,9 @@ export default function Gallery() {
!hiddenFiles ||
!archivedCollections
) {
- return { filteredData: [], galleryPeopleState: undefined };
- }
-
- if (activeCollectionID === TRASH_SECTION && !selectedSearchOption) {
- const filteredData = getUniqueFiles([
- ...trashedFiles,
- ...files.filter((file) => tempDeletedFileIds?.has(file.id)),
- ]);
dispatch({
type: "set",
- filteredData,
+ filteredData: [],
galleryPeopleState: undefined,
});
return;
@@ -613,6 +605,11 @@ export default function Gallery() {
activePerson,
people: filteredVisiblePeople,
};
+ } else if (activeCollectionID === TRASH_SECTION) {
+ filteredFiles = getUniqueFiles([
+ ...trashedFiles,
+ ...files.filter((file) => tempDeletedFileIds?.has(file.id)),
+ ]);
} else {
const baseFiles = barMode == "hidden-albums" ? hiddenFiles : files;
filteredFiles = getUniqueFiles(