From dafbb6d895e1e5b11d1f21a64283881688dad8cb Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 31 Dec 2019 15:05:20 +0800 Subject: [PATCH] up --- .../ui/book/read/page/delegate/HorizontalPageDelegate.kt | 6 +----- .../app/ui/book/read/page/delegate/ScrollPageDelegate.kt | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt index ef43b929e..ebb76100c 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/HorizontalPageDelegate.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) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/ScrollPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/ScrollPageDelegate.kt index bf8a51a02..5b25392a2 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/ScrollPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/ScrollPageDelegate.kt @@ -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)