mobile: fix color scheme

This commit is contained in:
ammarahm-ed
2023-08-09 09:33:06 +05:00
committed by Ammar Ahmed
parent f157229e00
commit 11f39316b5

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