feat: add high-contrast theme with accessible message bubbles (#5135)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
James Rich 2026-04-14 20:14:20 -05:00 committed by GitHub
parent f48fc61729
commit fa63a4ac50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 328 additions and 65 deletions

View file

@ -62,6 +62,13 @@ class UiPrefsImpl(
scope.launch { dataStore.edit { it[KEY_THEME] = value } }
}
override val contrastLevel: StateFlow<Int> =
dataStore.data.map { it[KEY_CONTRAST_LEVEL] ?: 0 }.stateIn(scope, SharingStarted.Lazily, 0)
override fun setContrastLevel(value: Int) {
scope.launch { dataStore.edit { it[KEY_CONTRAST_LEVEL] = value } }
}
override val locale: StateFlow<String> =
dataStore.data.map { it[KEY_LOCALE] ?: "" }.stateIn(scope, SharingStarted.Eagerly, "")
@ -152,6 +159,7 @@ class UiPrefsImpl(
val KEY_APP_INTRO_COMPLETED = booleanPreferencesKey("app_intro_completed")
val KEY_THEME = intPreferencesKey("theme")
val KEY_CONTRAST_LEVEL = intPreferencesKey("contrast-level")
val KEY_LOCALE = stringPreferencesKey("locale")
val KEY_NODE_SORT = intPreferencesKey("node-sort-option")
val KEY_INCLUDE_UNKNOWN = booleanPreferencesKey("include-unknown")