Fix tap navigation staying off after a cancelled button press (#3655)

Re-enable tap navigation after a cancelled button touch

A cancelled touch on a reader button (ACTION_CANCEL, e.g. the press turns
into a scroll) left tap navigation suppressed until the next press, so the
following tap did nothing.
This commit is contained in:
無字名3
2026-10-07 23:02:22 +06:00
committed by GitHub
parent fd4f73c908
commit ab7ee00c48
@@ -21,7 +21,7 @@ class ReaderButton @JvmOverloads constructor(
override fun onTouchEvent(event: MotionEvent): Boolean {
viewer?.pager?.setGestureDetectorEnabled(false)
if (event.actionMasked == MotionEvent.ACTION_UP) {
if (event.actionMasked == MotionEvent.ACTION_UP || event.actionMasked == MotionEvent.ACTION_CANCEL) {
viewer?.pager?.setGestureDetectorEnabled(true)
}
return super.onTouchEvent(event)