Skip to content

Commit

Permalink
fix: invalid keyboard lock
Browse files Browse the repository at this point in the history
  • Loading branch information
nopdan committed Feb 11, 2024
1 parent eff0fe9 commit f221504
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ object KeyboardSwitcher {
}

fun switchKeyboard(name: String?) {
if (name == null) return
val currentIdx = theme.allKeyboardIds.indexOf(currentKeyboardId)
var mappedName =
when (name) {
Expand Down Expand Up @@ -81,8 +80,10 @@ object KeyboardSwitcher {
}
}
else -> {
name.ifEmpty {
if (name.isNullOrEmpty()) {
if (currentKeyboard.isLock) currentKeyboardId else lastLockKeyboardId
} else {
name
}
}
}
Expand Down

0 comments on commit f221504

Please # to comment.