diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt index a0c6c962a..d2cae1e92 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt @@ -101,14 +101,16 @@ class PageView(context: Context, attrs: AttributeSet) : } fun upContent(position: Int = 0) { - pageFactory.let { + if (isScrollDelegate) { + curPage.setContent(pageFactory.currentPage()) + } else { when (position) { - -1 -> prevPage.setContent(it.previousPage()) - 1 -> nextPage.setContent(it.nextPage()) + -1 -> prevPage.setContent(pageFactory.previousPage()) + 1 -> nextPage.setContent(pageFactory.nextPage()) else -> { - curPage.setContent(it.currentPage()) - nextPage.setContent(it.nextPage()) - prevPage.setContent(it.previousPage()) + curPage.setContent(pageFactory.currentPage()) + nextPage.setContent(pageFactory.nextPage()) + prevPage.setContent(pageFactory.previousPage()) } } }