about summary refs log tree commit diff
path: root/src/App.native.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-12-14 14:48:40 -0600
committerGitHub <noreply@github.com>2023-12-14 14:48:40 -0600
commit7897dd24a14e65d8ab1aa0e474a09e0628da31b7 (patch)
tree77cec13da7f55ae1d8535550f497ad7314ece0e4 /src/App.native.tsx
parent075ffdf583c5393b896d22dd179d03208311ef4a (diff)
downloadvoidsky-7897dd24a14e65d8ab1aa0e474a09e0628da31b7.tar.zst
🤫 (#2211)
* Add new assets

* Add splashiness

* Add butter icon, spread it

* Cream together eggs, sugar, and vanilla

* Hi, I'd like to place and order. Yeah, none pizza with left beef, plz.

* test

* Refine animation

* tweak

* tweak

* tweak

* Tweak

* Simplify

* Cleanup

* Fix android logo

---------

Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
Diffstat (limited to 'src/App.native.tsx')
-rw-r--r--src/App.native.tsx46
1 files changed, 26 insertions, 20 deletions
diff --git a/src/App.native.tsx b/src/App.native.tsx
index d11d05e70..6402b4a89 100644
--- a/src/App.native.tsx
+++ b/src/App.native.tsx
@@ -6,6 +6,10 @@ import {RootSiblingParent} from 'react-native-root-siblings'
 import * as SplashScreen from 'expo-splash-screen'
 import {GestureHandlerRootView} from 'react-native-gesture-handler'
 import {QueryClientProvider} from '@tanstack/react-query'
+import {
+  SafeAreaProvider,
+  initialWindowMetrics,
+} from 'react-native-safe-area-context'
 
 import 'view/icons'
 
@@ -34,6 +38,7 @@ import {
 } from 'state/session'
 import {Provider as UnreadNotifsProvider} from 'state/queries/notifications/unread'
 import * as persisted from '#/state/persisted'
+import {Splash} from '#/Splash'
 
 SplashScreen.preventAutoHideAsync()
 
@@ -53,27 +58,28 @@ function InnerApp() {
     resumeSession(account)
   }, [resumeSession])
 
-  // wait for session to resume
-  if (isInitialLoad) return null
-
   return (
-    <React.Fragment
-      // Resets the entire tree below when it changes:
-      key={currentAccount?.did}>
-      <LoggedOutViewProvider>
-        <UnreadNotifsProvider>
-          <ThemeProvider theme={colorMode}>
-            {/* All components should be within this provider */}
-            <RootSiblingParent>
-              <GestureHandlerRootView style={s.h100pct}>
-                <TestCtrls />
-                <Shell />
-              </GestureHandlerRootView>
-            </RootSiblingParent>
-          </ThemeProvider>
-        </UnreadNotifsProvider>
-      </LoggedOutViewProvider>
-    </React.Fragment>
+    <SafeAreaProvider initialMetrics={initialWindowMetrics}>
+      <Splash isReady={!isInitialLoad}>
+        <React.Fragment
+          // Resets the entire tree below when it changes:
+          key={currentAccount?.did}>
+          <LoggedOutViewProvider>
+            <UnreadNotifsProvider>
+              <ThemeProvider theme={colorMode}>
+                {/* All components should be within this provider */}
+                <RootSiblingParent>
+                  <GestureHandlerRootView style={s.h100pct}>
+                    <TestCtrls />
+                    <Shell />
+                  </GestureHandlerRootView>
+                </RootSiblingParent>
+              </ThemeProvider>
+            </UnreadNotifsProvider>
+          </LoggedOutViewProvider>
+        </React.Fragment>
+      </Splash>
+    </SafeAreaProvider>
   )
 }