Add: Dynamic theming preference

This commit is contained in:
machiav3lli
2022-07-10 00:56:34 +02:00
parent 2ace49469e
commit 45161514cc
4 changed files with 16 additions and 1 deletions

View File

@ -241,6 +241,12 @@ val isBlackTheme: Boolean
else -> false
}
val isDynamicColorsTheme: Boolean
get() = when (Preferences[Preferences.Key.Theme]) {
is Preferences.Theme.Dynamic -> true
else -> false
}
fun Context.showBatteryOptimizationDialog() {
AlertDialog.Builder(this)
.setTitle(R.string.ignore_battery_optimization_title)