π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Merge branch 'main' into cities
Abhinavdf3aa80091d9
diff --cc apps/photos/src/pages/gallery/index.tsxindex 9c041ddef9,dda10a5fc2..22bf877781--- a/apps/photos/src/pages/gallery/index.tsx+++ b/apps/photos/src/pages/gallery/index.tsx@@@ -498,57 -488,73 +501,62 @@@ export default function Gallery()]);}- const filteredFiles = getUniqueFiles(- (isInHiddenSection ? hiddenFiles : files).filter((item) => {- if (tempDeletedFileIds?.has(item.id)) {- return false;- }-- if (!isInHiddenSection && tempHiddenFileIds?.has(item.id)) {- return false;- }+ const searchWorker = await ComlinkSearchWorker.getInstance();- // SEARCH MODE- if (isInSearchMode) {- if (- search?.date &&- !isSameDayAnyYear(search.date)(- new Date(item.metadata.creationTime / 1000)- )- ) {- return false;- }- if (- search?.location &&- !isInsideLocationTag(- {- latitude: item.metadata.latitude,- longitude: item.metadata.longitude,- },- search.location- )- ) {+ let filteredFiles: EnteFile[] = [];+ if (isInSearchMode) {+ filteredFiles = getUniqueFiles(await searchWorker.search(search));+ } else {+ filteredFiles = getUniqueFiles(+ (isInHiddenSection ? hiddenFiles : files).filter((item) => {+ if (tempDeletedFileIds?.has(item.id)) {return false;}- if (- search?.person &&- search.person.files.indexOf(item.id) === -1- ) {++ if (!isInHiddenSection && tempHiddenFileIds?.has(item.id)) {return false;}- if (- search?.thing &&- search.thing.files.indexOf(item.id) === -1- ) {- return false;++ // archived collections files can only be seen in their respective collection+ if (archivedCollections.has(item.collectionID)) {+ if (activeCollectionID === item.collectionID) {+ return true;+ } else {+ return false;+ }}++ // HIDDEN ITEMS SECTION - show all individual hidden filesif (- search?.text &&- search.text.files.indexOf(item.id) === -1+ activeCollectionID === HIDDEN_ITEMS_SECTION &&+ defaultHiddenCollectionIDs.has(item.collectionID)) {- return false;- }- if (search?.files && search.files.indexOf(item.id) === -1) {- return false;+ return true;}- if (- typeof search?.fileType !== 'undefined' &&- search.fileType !== item.metadata.fileType- ) {- return false;++ // Archived files can only be seen in archive section or their respective collection+ if (isArchivedFile(item)) {+ if (+ activeCollectionID === ARCHIVE_SECTION ||+ activeCollectionID === item.collectionID+ ) {+ return true;+ } else {+ return false;+ }}- if (search?.clip && search.clip.has(item.id) === false) {- return false;++ // ALL SECTION - show all files+ if (activeCollectionID === ALL_SECTION) {- return true;++ // show all files except the ones in hidden collections++ if (hiddenFileIds.has(item.id)) {++ return false;++ } else {++ return true;++ }}- return true;- }- // archived collections files can only be seen in their respective collection- if (archivedCollections.has(item.collectionID)) {+ // COLLECTION SECTION - show files in the active collectionif (activeCollectionID === item.collectionID) {return true;} else {