Skip to content

Commit

Permalink
fix: keyboard layout didn't switch in time on device's orientation ch…
Browse files Browse the repository at this point in the history
…anged
  • Loading branch information
WhiredPlanck committed Jul 28, 2024
1 parent b5c1674 commit 3517b0d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ class KeyboardWindow(
var final = dot.ifEmpty { smartMatchKeyboard() }

// 切换到 mini 键盘
val deviceKeyboard = context.resources.configuration.keyboard
val deviceKeyboard = service.resources.configuration.keyboard
val useMiniKeyboard = AppPrefs.defaultInstance().theme.useMiniKeyboard && deviceKeyboard != Configuration.KEYBOARD_NOKEYS
if (useMiniKeyboard) {
if (presetKeyboardIds.contains("mini")) final = "mini"
}

// 切换到横屏布局
if (context.isLandscapeMode()) {
if (service.isLandscapeMode()) {
val landscape = currentKeyboard?.landscapeKeyboard
if (!landscape.isNullOrEmpty() && presetKeyboardIds.contains(landscape)) final = landscape
}
Expand Down

0 comments on commit 3517b0d

Please sign in to comment.