diff options
Diffstat (limited to 'src/App.native.tsx')
-rw-r--r-- | src/App.native.tsx | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/src/App.native.tsx b/src/App.native.tsx index 5c4918f91..60bce0578 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -72,22 +72,28 @@ const InnerApp = observer(function AppImpl() { return null } + /* + * Session and initial state should be loaded prior to rendering below. + */ + return ( - <ThemeProvider theme={colorMode}> - <analytics.Provider> - <RootStoreProvider value={rootStore}> - <I18nProvider i18n={i18n}> - {/* All components should be within this provider */} - <RootSiblingParent> - <GestureHandlerRootView style={s.h100pct}> - <TestCtrls /> - <Shell /> - </GestureHandlerRootView> - </RootSiblingParent> - </I18nProvider> - </RootStoreProvider> - </analytics.Provider> - </ThemeProvider> + <UnreadNotifsProvider> + <ThemeProvider theme={colorMode}> + <analytics.Provider> + <RootStoreProvider value={rootStore}> + <I18nProvider i18n={i18n}> + {/* All components should be within this provider */} + <RootSiblingParent> + <GestureHandlerRootView style={s.h100pct}> + <TestCtrls /> + <Shell /> + </GestureHandlerRootView> + </RootSiblingParent> + </I18nProvider> + </RootStoreProvider> + </analytics.Provider> + </ThemeProvider> + </UnreadNotifsProvider> ) }) @@ -102,19 +108,21 @@ function App() { return null } + /* + * NOTE: only nothing here can depend on other data or session state, since + * that is set up in the InnerApp component above. + */ return ( <QueryClientProvider client={queryClient}> <SessionProvider> <ShellStateProvider> <PrefsStateProvider> <MutedThreadsProvider> - <UnreadNotifsProvider> - <InvitesStateProvider> - <ModalStateProvider> - <InnerApp /> - </ModalStateProvider> - </InvitesStateProvider> - </UnreadNotifsProvider> + <InvitesStateProvider> + <ModalStateProvider> + <InnerApp /> + </ModalStateProvider> + </InvitesStateProvider> </MutedThreadsProvider> </PrefsStateProvider> </ShellStateProvider> |