Skip to content

Commit

Permalink
fix: composing key label not display and reset as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
if-can committed Jan 16, 2025
1 parent b14a5ac commit deb7c99
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import com.osfans.trime.ime.candidates.suggestion.InlineSuggestionHandler
import com.osfans.trime.ime.composition.ComposingPopupWindow
import com.osfans.trime.ime.keyboard.InitializationUi
import com.osfans.trime.ime.keyboard.InputFeedbackManager
import com.osfans.trime.ime.keyboard.KeyboardSwitcher
import com.osfans.trime.util.findSectionFrom
import com.osfans.trime.util.forceShowSelf
import com.osfans.trime.util.isNightMode
Expand Down Expand Up @@ -236,6 +237,7 @@ open class TrimeInputMethodService : LifecycleInputMethodService() {
commitText(commit.text)
}
updateComposingText(ctx)
KeyboardSwitcher.currentKeyboardView.invalidateAllKeys()
}
is RimeMessage.KeyMessage ->
it.data.let event@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ package com.osfans.trime.ime.keyboard
@Deprecated("Migrate into KeyboardWindow")
object KeyboardSwitcher {
lateinit var currentKeyboard: Keyboard
lateinit var currentKeyboardView: KeyboardView
}
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,6 @@ class KeyboardView(
if (mOldPointerCount > 1 || mComboMode) KeyBehavior.COMBO else KeyBehavior.CLICK,
)
}
invalidateAllKeys()
mRepeatKeyIndex = NOT_A_KEY
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class KeyboardWindow(
cachedKeyboards[target] = newKeyboard to it
}
newView.let {
KeyboardSwitcher.currentKeyboardView = it
it.keyboardActionListener = keyboardActionListener
keyboardView.apply { add(it, lParams(matchParent, matchParent)) }
}
Expand Down

0 comments on commit deb7c99

Please sign in to comment.