pull/66/head
kunfei 5 years ago
parent 98b64a8909
commit dafbb6d895
  1. 6
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt
  2. 6
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/ScrollPageDelegate.kt

@ -39,11 +39,7 @@ abstract class HorizontalPageDelegate(pageView: PageView) : PageDelegate(pageVie
}
}
if (isMoved) {
isCancel = if (pageView.isScrollDelegate) {
if (direction == Direction.NEXT) distanceY < 0 else distanceY > 0
} else {
if (direction == Direction.NEXT) distanceX < 0 else distanceX > 0
}
isCancel = if (direction == Direction.NEXT) distanceX < 0 else distanceX > 0
isRunning = true
//设置触摸点
setTouchPoint(e2.x, e2.y)

@ -109,11 +109,7 @@ class ScrollPageDelegate(pageView: PageView) : PageDelegate(pageView) {
curPage?.dispatchTouchEvent(e2)
}
if (isMoved) {
isCancel = if (pageView.isScrollDelegate) {
if (direction == Direction.NEXT) distanceY < 0 else distanceY > 0
} else {
if (direction == Direction.NEXT) distanceX < 0 else distanceX > 0
}
isCancel = if (direction == Direction.NEXT) distanceY < 0 else distanceY > 0
isRunning = true
//设置触摸点
setTouchPoint(e2.x, e2.y)

Loading…
Cancel
Save