Skip to content

Commit b5c1674

Browse files
committed
fix: switcher didn't update after switching to different ascii mode keyboard
1 parent 10b885f commit b5c1674

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/java/com/osfans/trime/ime/keyboard/KeyboardWindow.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import com.osfans.trime.ime.core.TrimeInputMethodService
2323
import com.osfans.trime.ime.dependency.InputScope
2424
import com.osfans.trime.ime.keyboard.KeyboardPrefs.isLandscapeMode
2525
import com.osfans.trime.ime.window.BoardWindow
26+
import com.osfans.trime.ime.window.BoardWindowManager
2627
import com.osfans.trime.ime.window.ResidentWindow
2728
import me.tatarka.inject.annotations.Inject
2829
import splitties.views.dsl.core.add
@@ -38,6 +39,7 @@ class KeyboardWindow(
3839
private val service: TrimeInputMethodService,
3940
private val theme: Theme,
4041
private val rime: RimeSession,
42+
private val windowManager: BoardWindowManager,
4143
) : BoardWindow.NoBarBoardWindow(), ResidentWindow, InputBroadcastReceiver {
4244
private val cursorCapsMode: Int
4345
get() =
@@ -156,6 +158,9 @@ class KeyboardWindow(
156158
keyboardsCached[target] = keyboard
157159
attachKeyboard(target)
158160
}
161+
if (windowManager.isAttached(this)) {
162+
service.updateComposing()
163+
}
159164
}
160165
Timber.d("Switched to keyboard: $target")
161166
}

0 commit comments

Comments
 (0)