mobile: fix color scheme

This commit is contained in:
ammarahm-ed
2023-08-09 09:33:06 +05:00
parent a4bbfc1e10
commit 0f6d85351e

View File

@@ -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);