π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix(photos):fetch-two-factor-status-independently
Aswin Asok6af2f31cc6c6
diff --git a/web/apps/photos/src/components/sidebar/accounts/Account.tsx b/web/apps/photos/src/components/sidebar/accounts/Account.tsxindex bd17f95f43..164fb5f436 100644--- a/web/apps/photos/src/components/sidebar/accounts/Account.tsx+++ b/web/apps/photos/src/components/sidebar/accounts/Account.tsx@@ -120,14 +120,16 @@ export const Account: React.FC<AccountProps> = ({setTwoFactorEnabled(undefined);if (!open || sessionsVisibilityProps.open) return;let cancelled = false;- void Promise.all([- get2FAStatus().catch(() => undefined),- getActiveSessions().catch(() => undefined),- ]).then(([twoFactor, sessions]) => {- if (cancelled) return;- setTwoFactorEnabled(twoFactor);- setSessionCount(sessions?.length);- });+ void get2FAStatus()+ .catch(() => undefined)+ .then((twoFactor) => {+ if (!cancelled) setTwoFactorEnabled(twoFactor);+ });+ void getActiveSessions()+ .catch(() => undefined)+ .then((sessions) => {+ if (!cancelled) setSessionCount(sessions?.length);+ });return () => {cancelled = true;};