Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Mark offline mode for manual unlock usecase correctly (#1267)
Leendert de Borsta9203600c1f0
diff --git a/apps/mobile-app/app/initialize.tsx b/apps/mobile-app/app/initialize.tsxindex ff18cd7fa..a5b2d91fe 100644--- a/apps/mobile-app/app/initialize.tsx+++ b/apps/mobile-app/app/initialize.tsx@@ -53,6 +53,9 @@ export default function Initialize() : React.ReactNode {return;}+ // Set offline mode+ setOfflineMode(true);+// FaceID not enabledconst isFaceIDEnabled = enabledAuthMethods.includes('faceid');if (!isFaceIDEnabled) {@@ -81,9 +84,6 @@ export default function Initialize() : React.ReactNode {return;}- // Set offline mode- setOfflineMode(true);-// Success - navigate to credentialsrouter.replace('/(tabs)/credentials');} catch {diff --git a/apps/mobile-app/app/reinitialize.tsx b/apps/mobile-app/app/reinitialize.tsxindex 26411027c..fd85eff0e 100644--- a/apps/mobile-app/app/reinitialize.tsx+++ b/apps/mobile-app/app/reinitialize.tsx@@ -48,13 +48,16 @@ export default function ReinitializeScreen() : React.ReactNode {try {const hasEncryptedDatabase = await NativeVaultManager.hasEncryptedDatabase();- // Guard clause: No encrypted database+ // No encrypted databaseif (!hasEncryptedDatabase) {router.replace('/unlock');return;}- // Guard clause: FaceID not enabled+ // Set offline mode+ authContext.setOfflineMode(true);++ // FaceID not enabledconst isFaceIDEnabled = enabledAuthMethods.includes('faceid');if (!isFaceIDEnabled) {router.replace('/unlock');@@ -65,7 +68,7 @@ export default function ReinitializeScreen() : React.ReactNode {setStatus(t('app.status.unlockingVault'));const isUnlocked = await dbContext.unlockVault();- // Guard clause: Vault couldn't be unlocked+ // Vault couldn't be unlockedif (!isUnlocked) {router.replace('/unlock');return;@@ -76,7 +79,7 @@ export default function ReinitializeScreen() : React.ReactNode {setStatus(t('app.status.decryptingVault'));await new Promise(resolve => setTimeout(resolve, 1000));- // Guard clause: Migrations pending+ // Migrations pendingif (await dbContext.hasPendingMigrations()) {router.replace('/upgrade');return;