pull/517/head
gedoor 4 years ago
parent 98d3b809df
commit 450a2fc777
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt

@ -169,7 +169,6 @@ class PageView(context: Context, attrs: AttributeSet) :
setStartPoint(event.x, event.y) setStartPoint(event.x, event.y)
} }
MotionEvent.ACTION_MOVE -> { MotionEvent.ACTION_MOVE -> {
pressDown = true
if (!isMove) { if (!isMove) {
isMove = isMove =
abs(startX - event.x) > slopSquare || abs(startY - event.y) > slopSquare abs(startX - event.x) > slopSquare || abs(startY - event.y) > slopSquare
@ -187,6 +186,7 @@ class PageView(context: Context, attrs: AttributeSet) :
MotionEvent.ACTION_CANCEL, MotionEvent.ACTION_UP -> { MotionEvent.ACTION_CANCEL, MotionEvent.ACTION_UP -> {
removeCallbacks(longPressRunnable) removeCallbacks(longPressRunnable)
if (!pressDown) return true if (!pressDown) return true
pressDown = false
if (!isMove) { if (!isMove) {
if (!longPressed && !pressOnTextSelected) { if (!longPressed && !pressOnTextSelected) {
onSingleTapUp() onSingleTapUp()

Loading…
Cancel
Save