diff options
author | Eric Bailey <git@esb.lol> | 2023-11-14 16:54:02 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 16:54:02 -0600 |
commit | 68767d597e82bf492ca02792182898cd5f64df21 (patch) | |
tree | 6f45dea02f37161e9619f3c6694b17f64431aa30 /src/App.native.tsx | |
parent | ab6e3f2c5d9c658ca5cae76d035f951f056b8d6f (diff) | |
download | voidsky-68767d597e82bf492ca02792182898cd5f64df21.tar.zst |
Fix notification provider order, add comments (#1905)
* Fix notification provider order, add comments * Remove log
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> |