|
|
@ -7,18 +7,13 @@ enum class Theme { |
|
|
|
Dark, Light, Auto, Transparent; |
|
|
|
Dark, Light, Auto, Transparent; |
|
|
|
|
|
|
|
|
|
|
|
companion object { |
|
|
|
companion object { |
|
|
|
fun getTheme(): Theme { |
|
|
|
fun getTheme() = |
|
|
|
return if (AppConfig.isNightTheme) { |
|
|
|
if (AppConfig.isNightTheme) Dark |
|
|
|
Dark |
|
|
|
else Light |
|
|
|
} else Light |
|
|
|
|
|
|
|
} |
|
|
|
fun getTheme(backgroundColor: Int) = |
|
|
|
|
|
|
|
if (ColorUtils.isColorLight(backgroundColor)) Light |
|
|
|
|
|
|
|
else Dark |
|
|
|
|
|
|
|
|
|
|
|
fun getTheme(backgroundColor: Int): Theme { |
|
|
|
|
|
|
|
return if (ColorUtils.isColorLight(backgroundColor)) { |
|
|
|
|
|
|
|
Light |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
Dark |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |