Skip to content

Commit 21b29c9

Browse files
committed
Introduce shouldRedrawKeyboard for sendShiftUpEvent
1 parent 61901f9 commit 21b29c9

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

app/src/main/java/io/github/yawnoc/strokeinput/InputContainer.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ public boolean onTouchEvent(final MotionEvent event) {
450450
!isSwipeableKey(activeKey)
451451
)
452452
{
453-
sendShiftUpEvent();
453+
sendShiftUpEvent(true);
454454
break;
455455
}
456456

@@ -603,10 +603,10 @@ private void sendShiftMoveFromEvent(
603603
activePointerX = x;
604604
activePointerY = y;
605605

606-
sendShiftUpEvent();
606+
sendShiftUpEvent(true);
607607
}
608608

609-
private void sendShiftUpEvent() {
609+
private void sendShiftUpEvent(boolean shouldRedrawKeyboard) {
610610

611611
switch (shiftMode) {
612612
case SHIFT_SINGLE:
@@ -622,7 +622,10 @@ private void sendShiftUpEvent() {
622622
}
623623

624624
shiftPointerId = NONEXISTENT_POINTER_ID;
625-
invalidate();
625+
626+
if (shouldRedrawKeyboard) {
627+
invalidate();
628+
}
626629
}
627630

628631
private Keyboard.Key getKeyAtPoint(final int x, final int y) {

0 commit comments

Comments
 (0)