From 0363c3cce051b065ecdccc6d0a658683b571b245 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 21 Jan 2022 22:38:22 +0100 Subject: [PATCH] avoid crashing if a mini keyboards key is pressed --- .../com/simplemobiletools/keyboard/views/MyKeyboardView.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 6297734..32f21ea 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt @@ -1078,7 +1078,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut val msg = mHandler!!.obtainMessage(MSG_LONGPRESS, me) mHandler!!.sendMessageDelayed(msg, LONGPRESS_TIMEOUT.toLong()) } - showPreview(keyIndex) + + if (mPopupParent.id != R.id.mini_keyboard_view) { + showPreview(keyIndex) + } } MotionEvent.ACTION_MOVE -> { var continueLongPress = false