Skip to content

Commit

Permalink
fix: incorrect schemaId to resolve keyboard
Browse files Browse the repository at this point in the history
Use `crrentSchemaId` instead Of `shortSchemaId` to get the keyboard.

Fixes #907.
  • Loading branch information
goofyz committed Nov 22, 2023
1 parent 3399efb commit 21dbff3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/src/main/java/com/osfans/trime/data/theme/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,8 @@ class Theme {
val remapped =
if (".default" == name) {
val currentSchemaId = Rime.getCurrentRimeSchema()
val shortSchemaId = currentSchemaId.split("_".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()[0]
if (theme.presetKeyboards!!.containsKey(shortSchemaId)) {
return shortSchemaId
if (theme.presetKeyboards!!.containsKey(currentSchemaId)) {
return currentSchemaId
} else {
val alphabet = SchemaManager.getActiveSchema().alphabet
val twentySix = "qwerty"
Expand Down

0 comments on commit 21dbff3

Please sign in to comment.