Skip to content

Commit 467abde

Browse files
committed
fix: select first theme if selected theme was removed after deploy
1 parent 85e1b17 commit 467abde

File tree

1 file changed

+1
-1
lines changed
  • app/src/main/java/com/osfans/trime/ui/main

1 file changed

+1
-1
lines changed

app/src/main/java/com/osfans/trime/ui/main/Pickers.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ suspend fun Context.colorPicker(
6565
items = all.map { it.second }.toTypedArray()
6666
val current = prefs.themeAndColor.selectedColor
6767
val schemeIds = all.map { it.first }
68-
checkedItem = schemeIds.indexOf(current)
68+
checkedItem = schemeIds.indexOf(current).takeIf { it > -1 } ?: 1
6969
}
7070
postiveDispatcher = Dispatchers.Default
7171
onOKButton {

0 commit comments

Comments
 (0)