From 6ee1aedf802ac0d05014bd910a986f58d12b1346 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 9 Jan 2024 14:20:06 -0600 Subject: [PATCH] Install on native as well --- src/App.native.tsx | 43 ++++++++++++++++++++++++------------------- src/App.web.tsx | 2 +- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/App.native.tsx b/src/App.native.tsx index 6402b4a898..a9dfafe36f 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -13,6 +13,8 @@ import { import 'view/icons' +import {ThemeProvider as Alf} from '#/alf' +import {useColorModeTheme} from '#/alf/util/useColorModeTheme' import {init as initPersistedState} from '#/state/persisted' import {listenSessionDropped} from './state/events' import {useColorMode} from 'state/shell' @@ -46,6 +48,7 @@ function InnerApp() { const colorMode = useColorMode() const {isInitialLoad, currentAccount} = useSession() const {resumeSession} = useSessionApi() + const theme = useColorModeTheme(colorMode) // init useEffect(() => { @@ -60,25 +63,27 @@ function InnerApp() { return ( - - - - - - {/* All components should be within this provider */} - - - - - - - - - - - + + + + + + + {/* All components should be within this provider */} + + + + + + + + + + + + ) } diff --git a/src/App.web.tsx b/src/App.web.tsx index 1bdb3c208c..9ee9a4fd71 100644 --- a/src/App.web.tsx +++ b/src/App.web.tsx @@ -8,6 +8,7 @@ import {RootSiblingParent} from 'react-native-root-siblings' import 'view/icons' import {ThemeProvider as Alf} from '#/alf' +import {useColorModeTheme} from '#/alf/util/useColorModeTheme' import {init as initPersistedState} from '#/state/persisted' import {useColorMode} from 'state/shell' import {Shell} from 'view/shell/index' @@ -29,7 +30,6 @@ import { } from 'state/session' import {Provider as UnreadNotifsProvider} from 'state/queries/notifications/unread' import * as persisted from '#/state/persisted' -import {useColorModeTheme} from '#/alf/util/useColorModeTheme' function InnerApp() { const {isInitialLoad, currentAccount} = useSession()