π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Revert "[web] Reflect deletes in search result"
Manav Rathi243948f18255
diff --git a/web/packages/new/photos/components/gallery/reducer.ts b/web/packages/new/photos/components/gallery/reducer.tsindex 7ec357511b..b83dff05b5 100644--- a/web/packages/new/photos/components/gallery/reducer.ts+++ b/web/packages/new/photos/components/gallery/reducer.ts@@ -1214,12 +1214,7 @@ const derivePeopleView = (*/const stateByUpdatingFilteredFiles = (state: GalleryState) => {if (state.isInSearchMode) {- const filteredFiles = deriveSearchFilteredFiles(- state.searchResults,- state.filteredFiles,- state.trashedFiles,- state.tempDeletedFileIDs,- );+ const filteredFiles = state.searchResults ?? state.filteredFiles;return { ...state, filteredFiles };} else if (state.view?.type == "albums") {const filteredFiles = deriveAlbumsFilteredFiles(@@ -1311,32 +1306,6 @@ const deriveAlbumsFilteredFiles = (return sortAndUniqueFilteredFiles(filteredFiles, view.activeCollection);};-/**- * Compute the sorted list of files to show when we're showing search results- * and dependencies change.- */-const deriveSearchFilteredFiles = (- searchResults: GalleryState["searchResults"],- filteredFiles: GalleryState["filteredFiles"],- trashedFiles: GalleryState["trashedFiles"],- tempDeletedFileIDs: GalleryState["tempDeletedFileIDs"],-) => {- const baseResults = searchResults ?? filteredFiles;-- // The user might deleted files in the search results view itself. The- // search results in such cases will continue showing already deleted files.- // This'll get fixed the next time the search results are refreshed, but- // meanwhile prune deleted files from the active search results.-- const trashedFilesSet = new Set(trashedFiles.map(({ id }) => id));-- return baseResults.filter((file) => {- if (tempDeletedFileIDs.has(file.id)) return false;- if (trashedFilesSet.has(file.id)) return false;- return true;- });-};-/*** Compute the sorted list of files to show when we're in the "hidden-albums"* view and the dependencies change.