mirror of
https://github.com/mihonapp/mihon.git
synced 2026-10-16 13:48:09 -07:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user