π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Chain
Manav Rathi5ee24729e37a
diff --git a/web/apps/photos/src/pages/_app.tsx b/web/apps/photos/src/pages/_app.tsxindex 97740df76c..124eff1b4e 100644--- a/web/apps/photos/src/pages/_app.tsx+++ b/web/apps/photos/src/pages/_app.tsx@@ -193,7 +193,14 @@ export default function App({ Component, pageProps }: AppProps) {const onGenericError = useCallback((e: unknown) => {log.error(e);- showMiniDialog(genericErrorDialogAttributes());+ // The generic error handler is sometimes called in the context of+ // actions that were initiated by a confirmation dialog action handler+ // themselves, then we need to let the current one close.+ //+ // See: [Note: Chained MiniDialogs]+ setTimeout(() => {+ showMiniDialog(genericErrorDialogAttributes());+ }, 0);}, []);const logout = useCallback(() => void photosLogout(), []);diff --git a/web/apps/photos/src/pages/deduplicate.tsx b/web/apps/photos/src/pages/deduplicate.tsxindex b2c7d41c70..49633b7301 100644--- a/web/apps/photos/src/pages/deduplicate.tsx+++ b/web/apps/photos/src/pages/deduplicate.tsx@@ -1,6 +1,7 @@import { stashRedirect } from "@/accounts/services/redirect";import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator";import { errorDialogAttributes } from "@/base/components/utils/dialog";+import log from "@/base/log";import { ALL_SECTION } from "@/new/photos/services/collection";import { createFileCollectionIDs } from "@/new/photos/services/file";import { getLocalFiles } from "@/new/photos/services/files";@@ -146,17 +147,22 @@ export default function Deduplicate() {() => {},);await syncTrash(collections, () => {});+ await syncWithRemote();} catch (e) {- showMiniDialog(- errorDialogAttributes(- e instanceof ApiError &&- e.httpStatusCode == HttpStatusCode.Forbidden- ? t("NOT_FILE_OWNER")- : t("generic_error"),- ),- );- } finally {+ log.error("Dedup delete failed", e);await syncWithRemote();+ // See: [Note: Chained MiniDialogs]+ setTimeout(() => {+ showMiniDialog(+ errorDialogAttributes(+ e instanceof ApiError &&+ e.httpStatusCode == HttpStatusCode.Forbidden+ ? t("NOT_FILE_OWNER")+ : t("generic_error"),+ ),+ );+ }, 0);+ } finally {hideLoadingBar();}};