π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Shared date select
Manav Rathib785fe69f426
diff --git a/web/apps/photos/src/components/FileList.tsx b/web/apps/photos/src/components/FileList.tsxindex 7e9415652d..367fea4b2d 100644--- a/web/apps/photos/src/components/FileList.tsx+++ b/web/apps/photos/src/components/FileList.tsx@@ -677,10 +677,10 @@ export const FileList: React.FC<FileListProps> = ({useEffect(() => {// Nothing to do here if nothing is selected.- if (!galleryContext.selectedFile) return;+ if (!selected) return;const notSelectedFiles = (annotatedFiles ?? []).filter(- (item) => !galleryContext.selectedFile[item.file.id],+ (item) => !selected[item.file.id],);const unselectedDates = new Set(@@ -706,7 +706,7 @@ export const FileList: React.FC<FileListProps> = ({localSelectedDates.forEach((date) => checked.add(date));return checked;});- }, [galleryContext.selectedFile]);+ }, [selected]);const handleSelectMulti = handleSelectCreatorMulti(setSelected,@@ -847,9 +847,7 @@ export const FileList: React.FC<FileListProps> = ({listItem: TimeStampListItem,isScrolling: boolean,) => {- // Enhancement: This logic doesn't work on the shared album screen, the- // galleryContext.selectedFile is always null there.- const haveSelection = (galleryContext.selectedFile?.count ?? 0) > 0;+ const haveSelection = (selected.count ?? 0) > 0;switch (listItem.tag) {case "date":return listItem.dates ? (diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsxindex cfb19d646a..edf969fc0a 100644--- a/web/apps/photos/src/pages/gallery.tsx+++ b/web/apps/photos/src/pages/gallery.tsx@@ -135,7 +135,6 @@ const defaultGalleryContext: GalleryContextType = {user: null,userIDToEmailMap: null,emailList: null,- selectedFile: null,};export const GalleryContext = createContext<GalleryContextType>(@@ -881,7 +880,6 @@ const Page: React.FC = () => {// TODO(RE): RenameuserIDToEmailMap: state.emailByUserID,emailList: state.shareSuggestionEmails,- selectedFile: selected,}}><FullScreenDropZonediff --git a/web/apps/photos/src/types/gallery/index.ts b/web/apps/photos/src/types/gallery/index.tsindex db469668f1..5549cf5cde 100644--- a/web/apps/photos/src/types/gallery/index.ts+++ b/web/apps/photos/src/types/gallery/index.ts@@ -44,5 +44,4 @@ export interface GalleryContextType {user: User;userIDToEmailMap: Map<number, string>;emailList: string[];- selectedFile: SelectedState;}