Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update deep link navigation (#2073)
Leendert de Borst5c47a2037866
diff --git a/apps/mobile-app/app/_layout.tsx b/apps/mobile-app/app/_layout.tsxindex 49b2be943..5e45f5fa7 100644--- a/apps/mobile-app/app/_layout.tsx+++ b/apps/mobile-app/app/_layout.tsx@@ -1,6 +1,6 @@import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';import { useFonts } from 'expo-font';-import { Stack, useRouter } from 'expo-router';+import { Href, Stack, useRouter } from 'expo-router';import * as SplashScreen from 'expo-splash-screen';import { useEffect, useRef, useState } from 'react';import { Linking, StyleSheet, Platform } from 'react-native';@@ -37,6 +37,7 @@ function RootLayoutNav() : React.ReactNode {const [bootComplete, setBootComplete] = useState(false);const hasBooted = useRef(false);+ const pendingActionPath = useRef<string | null>(null);useEffect(() => {/**@@ -63,7 +64,16 @@ function RootLayoutNav() : React.ReactNode {.replace('aliasvault://', '').replace('exp+aliasvault://', '');- navigation.setReturnUrl({ path });+ /*+ * Action URLs (open/...) are owned by the /open/[...path] route (ActionHandler).+ * We route there explicitly in the redirect effect below instead of going via+ * the NavigationContext. This prevents double navigation after vault unlock.+ */+ if (path.startsWith('open/')) {+ pendingActionPath.current = path;+ } else {+ navigation.setReturnUrl({ path });+ }}setBootComplete(true);@@ -81,6 +91,11 @@ function RootLayoutNav() : React.ReactNode {return;}+ if (pendingActionPath.current) {+ router.replace(`/${pendingActionPath.current}` as Href);+ return;+ }+router.replace('/initialize');};