From 7d0bdd52d38dfd5cf197c3b2c9c6e99d1f631d80 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 21 Sep 2019 21:58:07 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/widget/page/PageView.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 ca4d9b633..72aa4b4ef 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 @@ -100,14 +100,14 @@ class PageView(context: Context, attrs: AttributeSet) : curPage?.setContent(it.currentPage()) nextPage?.setContent(it.nextPage()) prevPage?.setContent(it.previousPage()) + callback?.let { callback -> + if (isScrollDelegate()) { + curPage?.scrollTo(callback.textChapter()?.getStartLine(callback.durChapterPos())) + } + } } } } - callback?.let { - if (isScrollDelegate()) { - curPage?.scrollTo(it.textChapter()?.getStartLine(it.durChapterPos())) - } - } } fun moveToPrevPage(noAnim: Boolean = true) {