Skip to content

Commit

Permalink
mobile: fix color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Sep 4, 2023
1 parent f157229 commit 11f3931
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions apps/mobile/share/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ if (appSettings) {
}

const systemColorScheme = Appearance.getColorScheme();
const appColorScheme = appSettings.colorScheme;
const useSystemTheme = appSettings.useSystemTheme;
const appColorScheme = appSettings?.colorScheme;
const useSystemTheme = appSettings?.useSystemTheme;
const currentColorScheme = useSystemTheme ? systemColorScheme : appColorScheme;

const theme = currentColorScheme
? appSettings?.darkTheme
: appSettings?.lightTheme;
const theme =
currentColorScheme === "dark"
? appSettings?.darkTheme
: appSettings?.lightTheme;

const currentTheme =
theme || (currentColorScheme === "dark" ? ThemeDark : ThemeLight);
Expand Down

0 comments on commit 11f3931

Please sign in to comment.