File tree Expand file tree Collapse file tree 5 files changed +3
-9
lines changed
app/src/main/java/com/osfans/trime Expand file tree Collapse file tree 5 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,6 @@ class Rime :
4646 override var compositionCached = RimeProto .Context .Composition ()
4747 private set
4848
49- override var isComposing: Boolean = false
50- private set
51-
5249 override var hasMenu: Boolean = false
5350 private set
5451
@@ -290,7 +287,6 @@ class Rime :
290287 }
291288 is RimeMessage .CompositionMessage -> {
292289 val composition = it.data
293- isComposing = composition.length > 0
294290 compositionCached = composition
295291 }
296292 is RimeMessage .CandidateMenuMessage -> {
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ interface RimeApi {
1818
1919 val compositionCached: RimeProto .Context .Composition
2020
21- val isComposing: Boolean
22-
2321 val hasMenu: Boolean
2422
2523 val paging: Boolean
Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ open class TrimeInputMethodService : LifecycleInputMethodService() {
422422 if (newSelStart != newSelEnd) return
423423 if (candidatesStart == candidatesEnd) {
424424 postRimeJob {
425- if (isComposing) {
425+ if (statusCached. isComposing) {
426426 Timber .d(" handleCursorUpdate: commit composition" )
427427 commitComposition()
428428 }
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ class Key(
217217 val asciiMode = rime.run { statusCached }.isAsciiMode
218218 val paging = rime.run { paging }
219219 val hasMenu = rime.run { hasMenu }
220- val composing = rime.run { isComposing }
220+ val composing = rime.run { statusCached }.isComposing
221221 return keyActions[KeyBehavior .ASCII ].takeIf { asciiMode }
222222 ? : keyActions[KeyBehavior .PAGING ]?.takeIf { paging }
223223 ? : keyActions[KeyBehavior .HAS_MENU ]?.takeIf { hasMenu }
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ class KeyAction(
9595 }
9696 if (keyboard.isOnlyShiftOn) {
9797 val asciiMode = rime.run { statusCached }.isAsciiMode
98- val composing = rime.run { isComposing }
98+ val composing = rime.run { statusCached }.isComposing
9999 if (! hookShiftNum && ! composing && code in KeyEvent .KEYCODE_0 .. KeyEvent .KEYCODE_9 ) {
100100 return adjustCase(shiftLabel, keyboard)
101101 }
You can’t perform that action at this time.
0 commit comments