Always handle key presses

Otherwise there won't be any click feedback when "Show key popup" is disabled
This commit is contained in:
Naveen 2023-01-31 21:25:41 +05:30
parent d3bf5f0d72
commit 96cc36d13a
1 changed files with 4 additions and 4 deletions

View File

@ -753,10 +753,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
}
private fun showPreview(keyIndex: Int) {
if (!context.config.showPopupOnKeypress) {
return
}
val oldKeyIndex = mCurrentKeyIndex
val previewPopup = mPreviewPopup
mCurrentKeyIndex = keyIndex
@ -784,6 +780,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
}
}
if (!context.config.showPopupOnKeypress) {
return
}
// If key changed and preview is on ...
if (oldKeyIndex != mCurrentKeyIndex) {
if (previewPopup.isShowing) {