From 7dd6dc3a6a6bf9a5dc3a9d2031e6b459229880b0 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 19 Feb 2020 15:38:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/book/read/page/delegate/SimulationPageDelegate.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt index 28bfbe5fb..bcd4f1bad 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt @@ -106,19 +106,17 @@ class SimulationPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageVi override fun setDirection(direction: Direction) { super.setDirection(direction) when (direction) { - Direction.PREV -> { + Direction.PREV -> //上一页滑动不出现对角 if (startX > viewWidth / 2.0) { calcCornerXY(startX, viewHeight.toFloat()) } else { calcCornerXY(viewWidth - startX, viewHeight.toFloat()) } - } - Direction.NEXT -> { + Direction.NEXT -> if (viewWidth / 2.0 > startX) { calcCornerXY(viewWidth - startX, startY) } - } else -> Unit } }