Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update offline mode checks (#771)

Leendert de Borst1219d49fb468
diff --git a/apps/mobile-app/app/(tabs)/credentials/index.tsx b/apps/mobile-app/app/(tabs)/credentials/index.tsx
index 1aa753dee..a5c615979 100644
--- a/apps/mobile-app/app/(tabs)/credentials/index.tsx
+++ b/apps/mobile-app/app/(tabs)/credentials/index.tsx
@@ -150,6 +150,7 @@ export default function CredentialsScreen() : React.ReactNode {
onOffline: () => {
setRefreshing(false);
setIsLoadingCredentials(false);
+ authContext.setOfflineMode(true);
setTimeout(() => {
Toast.show({
type: 'error',
diff --git a/apps/mobile-app/app/_layout.tsx b/apps/mobile-app/app/_layout.tsx
index 0ff4f2d95..2a439310c 100644
--- a/apps/mobile-app/app/_layout.tsx
+++ b/apps/mobile-app/app/_layout.tsx
@@ -121,7 +121,7 @@ function RootLayoutNav() : React.ReactNode {
/**
* Handle offline state and prompt user for action.
*/
- onOffline: () => {
+ onOffline: async () => {
Alert.alert(
'Sync Issue',
'The AliasVault server could not be reached and your vault could not be synced. Would you like to open your local vault in read-only mode or retry the connection?',
@@ -133,7 +133,7 @@ function RootLayoutNav() : React.ReactNode {
*/
onPress: async () : Promise<void> => {
setStatus('Opening vault in read-only mode');
- handleVaultUnlock();
+ await handleVaultUnlock();
}
},
{