Use black theme instead of dark when set to follow system theme

This commit is contained in:
Jarno Rankinen 2023-08-28 22:11:39 +03:00
parent 493093c2a7
commit 84f0ab87fb
1 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ object ThemeUtils {
*/ */
fun setActivityTheme(activity: Activity, otherThemes: ActivityOtherThemes) { fun setActivityTheme(activity: Activity, otherThemes: ActivityOtherThemes) {
when (getApplicationTheme(activity)) { when (getApplicationTheme(activity)) {
SYSTEM_THEME_VALUE -> if (isSystemDarkTheme(activity.resources)) activity.setTheme(otherThemes.dark) SYSTEM_THEME_VALUE -> if (isSystemDarkTheme(activity.resources)) activity.setTheme(otherThemes.black)
THEME_DARK_VALUE -> activity.setTheme(otherThemes.dark) THEME_DARK_VALUE -> activity.setTheme(otherThemes.dark)
THEME_BLACK_VALUE -> activity.setTheme(otherThemes.black) THEME_BLACK_VALUE -> activity.setTheme(otherThemes.black)
} }
@ -202,7 +202,7 @@ object ThemeUtils {
@StyleRes @StyleRes
private fun themeToRes(context: Context, theme: String): Int = private fun themeToRes(context: Context, theme: String): Int =
when (theme) { when (theme) {
SYSTEM_THEME_VALUE -> if (isSystemDarkTheme(context.resources)) R.style.Theme_Vector_Dark else R.style.Theme_Vector_Light SYSTEM_THEME_VALUE -> if (isSystemDarkTheme(context.resources)) R.style.Theme_Vector_Black else R.style.Theme_Vector_Light
THEME_DARK_VALUE -> R.style.Theme_Vector_Dark THEME_DARK_VALUE -> R.style.Theme_Vector_Dark
THEME_BLACK_VALUE -> R.style.Theme_Vector_Black THEME_BLACK_VALUE -> R.style.Theme_Vector_Black
else -> R.style.Theme_Vector_Light else -> R.style.Theme_Vector_Light