Skip to content
Snippets Groups Projects
Commit 5865dde3 authored by Aleksandras Kostarevas's avatar Aleksandras Kostarevas
Browse files

Fix dark mode not automatically switching

parent 0d7d6b81
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ val DynamicSystemTheme = ThemeOption( ...@@ -23,7 +23,7 @@ val DynamicSystemTheme = ThemeOption(
when (uiModeManager.nightMode) { when (uiModeManager.nightMode) {
UiModeManager.MODE_NIGHT_YES -> dynamicDarkColorScheme(it) UiModeManager.MODE_NIGHT_YES -> dynamicDarkColorScheme(it)
UiModeManager.MODE_NIGHT_NO -> dynamicLightColorScheme(it) UiModeManager.MODE_NIGHT_NO -> dynamicLightColorScheme(it)
UiModeManager.MODE_NIGHT_AUTO -> { else -> {
val currentNightMode = it.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK val currentNightMode = it.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
if(currentNightMode == Configuration.UI_MODE_NIGHT_NO) { if(currentNightMode == Configuration.UI_MODE_NIGHT_NO) {
dynamicLightColorScheme(it) dynamicLightColorScheme(it)
...@@ -31,7 +31,6 @@ val DynamicSystemTheme = ThemeOption( ...@@ -31,7 +31,6 @@ val DynamicSystemTheme = ThemeOption(
dynamicDarkColorScheme(it) dynamicDarkColorScheme(it)
} }
} }
else -> dynamicDarkColorScheme(it)
} }
} }
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment