From 96cc36d13a3fa69dfdf2e71dd98aae1bc69c9900 Mon Sep 17 00:00:00 2001 From: Naveen Date: Tue, 31 Jan 2023 21:25:41 +0530 Subject: [PATCH] Always handle key presses Otherwise there won't be any click feedback when "Show key popup" is disabled --- .../simplemobiletools/keyboard/views/MyKeyboardView.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt index 1eb8d626..e55ec2c8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt @@ -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) {