about summary refs log tree commit diff
path: root/src/App.native.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/App.native.tsx')
-rw-r--r--src/App.native.tsx33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/App.native.tsx b/src/App.native.tsx
index 8bb204923..fcd6e787b 100644
--- a/src/App.native.tsx
+++ b/src/App.native.tsx
@@ -2,18 +2,17 @@ import 'react-native-url-polyfill/auto'
 import React, {useState, useEffect} from 'react'
 import {Linking} from 'react-native'
 import {RootSiblingParent} from 'react-native-root-siblings'
-import {GestureHandlerRootView} from 'react-native-gesture-handler'
 import SplashScreen from 'react-native-splash-screen'
 import {SafeAreaProvider} from 'react-native-safe-area-context'
 import {observer} from 'mobx-react-lite'
 import {ThemeProvider} from 'lib/ThemeContext'
 import * as view from './view/index'
 import {RootStoreModel, setupState, RootStoreProvider} from './state'
-import {MobileShell} from './view/shell/mobile'
-import {s} from 'lib/styles'
+import {Shell} from './view/shell'
 import * as notifee from 'lib/notifee'
 import * as analytics from 'lib/analytics'
 import * as Toast from './view/com/util/Toast'
+import {handleLink} from './Navigation'
 
 const App = observer(() => {
   const [rootStore, setRootStore] = useState<RootStoreModel | undefined>(
@@ -31,11 +30,11 @@ const App = observer(() => {
       store.hackCheckIfUpgradeNeeded()
       Linking.getInitialURL().then((url: string | null) => {
         if (url) {
-          store.nav.handleLink(url)
+          handleLink(url)
         }
       })
       Linking.addEventListener('url', ({url}) => {
-        store.nav.handleLink(url)
+        handleLink(url)
       })
       store.onSessionDropped(() => {
         Toast.show('Sorry! Your session expired. Please log in again.')
@@ -48,19 +47,17 @@ const App = observer(() => {
     return null
   }
   return (
-    <GestureHandlerRootView style={s.h100pct}>
-      <ThemeProvider theme={rootStore.shell.darkMode ? 'dark' : 'light'}>
-        <RootSiblingParent>
-          <analytics.Provider>
-            <RootStoreProvider value={rootStore}>
-              <SafeAreaProvider>
-                <MobileShell />
-              </SafeAreaProvider>
-            </RootStoreProvider>
-          </analytics.Provider>
-        </RootSiblingParent>
-      </ThemeProvider>
-    </GestureHandlerRootView>
+    <ThemeProvider theme={rootStore.shell.darkMode ? 'dark' : 'light'}>
+      <RootSiblingParent>
+        <analytics.Provider>
+          <RootStoreProvider value={rootStore}>
+            <SafeAreaProvider>
+              <Shell />
+            </SafeAreaProvider>
+          </RootStoreProvider>
+        </analytics.Provider>
+      </RootSiblingParent>
+    </ThemeProvider>
   )
 })