Skip to content

Commit

Permalink
fix: select first theme if selected theme was removed after deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
goofyz committed Dec 8, 2023
1 parent c74f890 commit 327a722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/com/osfans/trime/ui/main/Pickers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ suspend fun Context.colorPicker(
items = all.map { it.second }.toTypedArray()
val current = prefs.themeAndColor.selectedColor
val schemeIds = all.map { it.first }
checkedItem = schemeIds.indexOf(current)
checkedItem = schemeIds.indexOf(current).takeIf { it > -1 } ?: 1
}
postiveDispatcher = Dispatchers.Default
onOKButton {
Expand Down

0 comments on commit 327a722

Please sign in to comment.