File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/src/main/java/com/osfans/trime/ui/main Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,14 @@ suspend fun Context.colorPicker(
4848 val all = Config .get().presetColorSchemes
4949 items = all.map { it.second }.toTypedArray()
5050 val current = prefs.themeAndColor.selectedColor
51- val source = all.map { it.first }.toTypedArray()
52- checkedItem = source .indexOf(current)
51+ val schemeIds = all.map { it.first }
52+ checkedItem = schemeIds .indexOf(current)
5353 }
5454 postiveDispatcher = Dispatchers .Default
5555 onOKButton {
56- prefs.themeAndColor.selectedColor = items[checkedItem].toString()
56+ val all = Config .get().presetColorSchemes
57+ val schemeIds = all.map { it.first }
58+ prefs.themeAndColor.selectedColor = schemeIds[checkedItem]
5759 Trime .getServiceOrNull()?.initKeyboard() // 立刻重初始化键盘生效
5860 }
5961 }.create()
You can’t perform that action at this time.
0 commit comments