From 92de51fdab76fa3de22ac6653b361641d428106b Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 22 Sep 2019 21:14:51 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/widget/page/PageView.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt b/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt index 474f74887..f37622f4b 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt @@ -71,14 +71,19 @@ class PageView(context: Context, attrs: AttributeSet) : PageDelegate.Direction.PREV -> { it.moveToPrevious() upContent() - curPage?.scrollToBottom() } PageDelegate.Direction.NEXT -> { it.moveToNext() upContent() - curPage?.scrollTo(0) } - else -> return + else -> Unit + } + } + if (isScrollDelegate()) { + when (direction) { + PageDelegate.Direction.PREV -> curPage?.scrollToBottom() + PageDelegate.Direction.NEXT -> curPage?.scrollTo(0) + else -> Unit } } }