π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Direct
Manav Rathica62fb51051c
diff --git a/web/apps/photos/src/components/Collections/CollectionOptions/index.tsx b/web/apps/photos/src/components/Collections/CollectionOptions/index.tsxindex ec91b43610..2b6e806ba8 100644--- a/web/apps/photos/src/components/Collections/CollectionOptions/index.tsx+++ b/web/apps/photos/src/components/Collections/CollectionOptions/index.tsx@@ -255,16 +255,6 @@ const CollectionOptions = (props: CollectionOptionsProps) => {}};- const deleteCollectionAlongWithFiles = async () => {- await CollectionAPI.deleteCollection(activeCollection.id, false);- setActiveCollectionID(ALL_SECTION);- };-- const deleteCollectionButKeepFiles = async () => {- await CollectionAPI.deleteCollection(activeCollection.id, true);- setActiveCollectionID(ALL_SECTION);- };-const leaveSharedAlbum = async () => {await CollectionAPI.leaveSharedAlbum(activeCollection.id);setActiveCollectionID(ALL_SECTION);@@ -328,16 +318,12 @@ const CollectionOptions = (props: CollectionOptionsProps) => {),proceed: {text: t("DELETE_PHOTOS"),- action: handleCollectionAction(- CollectionActions.DELETE_WITH_FILES,- ),+ action: deleteCollectionAlongWithFiles,variant: "critical",},secondary: {text: t("KEEP_PHOTOS"),- action: handleCollectionAction(- CollectionActions.DELETE_BUT_KEEP_FILES,- ),+ action: deleteCollectionButKeepFiles,variant: "primary",},close: {@@ -346,6 +332,22 @@ const CollectionOptions = (props: CollectionOptionsProps) => {});};+ const _deleteCollectionAlongWithFiles = async () => {+ await CollectionAPI.deleteCollection(activeCollection.id, false);+ setActiveCollectionID(ALL_SECTION);+ };++ const _deleteCollectionButKeepFiles = async () => {+ await CollectionAPI.deleteCollection(activeCollection.id, true);+ setActiveCollectionID(ALL_SECTION);+ };++ const deleteCollectionAlongWithFiles = () =>+ wrapErrorAndSyncLoading(_deleteCollectionAlongWithFiles);++ const deleteCollectionButKeepFiles = () =>+ wrapErrorAndSyncLoading(_deleteCollectionButKeepFiles);+const confirmEmptyTrash = () =>setDialogMessage({title: t("EMPTY_TRASH_TITLE"),