Skip to content

Commit 5444b4b

Browse files
author
therealbluepandabear
committed
Ensure long press handler callbacks are removed when event.action is also MotionEvent.ACTION_MOVE for ColorSwitcherView.kt.
1 parent 872cc1f commit 5444b4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • app/src/main/java/com/therealbluepandabear/pixapencil/customviews/colorswitcherview

app/src/main/java/com/therealbluepandabear/pixapencil/customviews/colorswitcherview/ColorSwitcherView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class ColorSwitcherView(context: Context, attributeSet: AttributeSet) : View(con
364364
onColorPickerTapped.invoke()
365365
}
366366

367-
if (event.action == MotionEvent.ACTION_UP) {
367+
if (event.action == MotionEvent.ACTION_UP || event.action == MotionEvent.ACTION_MOVE) {
368368
handler.removeCallbacks(longPressedRunnable)
369369
}
370370

0 commit comments

Comments
 (0)