fix: revert splash screen overrides, remove redundant SafeAreaProvider
expo-router 56 already calls _internal_preventAutoHideAsync() internally. Calling preventAutoHideAsync() at module level created a second user lock that blocked the native splash indefinitely on Android, causing a crash. SafeAreaProvider removed as expo-router's ExpoRoot already wraps with it. Keep SplashScreen.hideAsync() to release the splash after SecureStore reads. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,13 +2,10 @@ import { useEffect } from "react";
|
|||||||
import { Stack, router, SplashScreen } from "expo-router";
|
import { Stack, router, SplashScreen } from "expo-router";
|
||||||
import { StatusBar } from "expo-status-bar";
|
import { StatusBar } from "expo-status-bar";
|
||||||
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
||||||
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
||||||
import "../global.css";
|
import "../global.css";
|
||||||
import { Colors } from "@/constants/theme";
|
import { Colors } from "@/constants/theme";
|
||||||
import { useSettings } from "@/hooks/useSettings";
|
import { useSettings } from "@/hooks/useSettings";
|
||||||
|
|
||||||
SplashScreen.preventAutoHideAsync();
|
|
||||||
|
|
||||||
export default function RootLayout() {
|
export default function RootLayout() {
|
||||||
const { settings, ready } = useSettings();
|
const { settings, ready } = useSettings();
|
||||||
|
|
||||||
@@ -25,7 +22,6 @@ export default function RootLayout() {
|
|||||||
}, [ready, settings.onboardingDone]);
|
}, [ready, settings.onboardingDone]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SafeAreaProvider>
|
|
||||||
<GestureHandlerRootView style={{ flex: 1, backgroundColor: Colors.bg }}>
|
<GestureHandlerRootView style={{ flex: 1, backgroundColor: Colors.bg }}>
|
||||||
<StatusBar style="light" />
|
<StatusBar style="light" />
|
||||||
<Stack
|
<Stack
|
||||||
@@ -44,6 +40,5 @@ export default function RootLayout() {
|
|||||||
<Stack.Screen name="onboarding" options={{ headerShown: false }} />
|
<Stack.Screen name="onboarding" options={{ headerShown: false }} />
|
||||||
</Stack>
|
</Stack>
|
||||||
</GestureHandlerRootView>
|
</GestureHandlerRootView>
|
||||||
</SafeAreaProvider>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user