ui: force dark theme in TV mode

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2023-04-04 20:53:42 +02:00
parent 794a2a1925
commit cd812b03cd
2 changed files with 19 additions and 2 deletions
@@ -41,6 +41,12 @@ object UserKnobs {
it[DARK_THEME] ?: false
}
suspend fun setDarkTheme(on: Boolean) {
Application.getPreferencesDataStore().edit {
it[DARK_THEME] = on
}
}
private val ALLOW_REMOTE_CONTROL_INTENTS = booleanPreferencesKey("allow_remote_control_intents")
val allowRemoteControlIntents: Flow<Boolean>
get() = Application.getPreferencesDataStore().data.map {