From 6124e5283628564b651463d7710f13096e9bd20c Mon Sep 17 00:00:00 2001 From: Ansh Date: Mon, 8 May 2023 16:05:36 -0400 Subject: [PATCH] add theme to SafeAreaView and preventAutoHide SplashScreen (#592) --- src/App.native.tsx | 7 +++---- src/view/shell/index.tsx | 15 +++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/App.native.tsx b/src/App.native.tsx index f330cfa0..66722dc1 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -5,7 +5,6 @@ import {withSentry} from 'lib/sentry' import {Linking} from 'react-native' import {RootSiblingParent} from 'react-native-root-siblings' import * as SplashScreen from 'expo-splash-screen' -import {SafeAreaProvider} from 'react-native-safe-area-context' import {GestureHandlerRootView} from 'react-native-gesture-handler' import {observer} from 'mobx-react-lite' import {ThemeProvider} from 'lib/ThemeContext' @@ -18,6 +17,8 @@ import * as analytics from 'lib/analytics' import * as Toast from './view/com/util/Toast' import {handleLink} from './Navigation' +SplashScreen.preventAutoHideAsync() + const App = observer(() => { const [rootStore, setRootStore] = useState( undefined, @@ -55,9 +56,7 @@ const App = observer(() => { - - - + diff --git a/src/view/shell/index.tsx b/src/view/shell/index.tsx index 3c152011..a6066b25 100644 --- a/src/view/shell/index.tsx +++ b/src/view/shell/index.tsx @@ -17,6 +17,7 @@ import * as backHandler from 'lib/routes/back-handler' import {RoutesContainer, TabsNavigator} from '../../Navigation' import {isStateAtTabRoot} from 'lib/routes/helpers' import {isAndroid} from 'platform/detection' +import {SafeAreaProvider} from 'react-native-safe-area-context' const ShellInner = observer(() => { const store = useStores() @@ -78,12 +79,14 @@ export const Shell: React.FC = observer(() => { const pal = usePalette('default') const theme = useTheme() return ( - - - - - - + + + + + + + + ) })