Fixed a bug when clicking on layout change and space at the same time
This commit is contained in:
parent
7ac8bc9c3b
commit
09bc110eb6
|
@ -1154,8 +1154,8 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
|
|
||||||
// fix a glitch with long pressing backspace, then clicking some letter
|
// fix a glitch with long pressing backspace, then clicking some letter
|
||||||
if (mRepeatKeyIndex != NOT_A_KEY) {
|
if (mRepeatKeyIndex != NOT_A_KEY) {
|
||||||
val key = mKeys[mRepeatKeyIndex]
|
val key = mKeys.getOrNull(mRepeatKeyIndex)
|
||||||
if (key.code == KEYCODE_DELETE) {
|
if (key?.code == KEYCODE_DELETE) {
|
||||||
mHandler?.removeMessages(MSG_REPEAT)
|
mHandler?.removeMessages(MSG_REPEAT)
|
||||||
mRepeatKeyIndex = NOT_A_KEY
|
mRepeatKeyIndex = NOT_A_KEY
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue