diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/NoAnimPageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/NoAnimPageDelegate.kt index 52dc2aeeb..cf18cb1db 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/NoAnimPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/NoAnimPageDelegate.kt @@ -1,19 +1,14 @@ package io.legado.app.ui.book.read.page.delegate -import android.graphics.Canvas import io.legado.app.ui.book.read.page.PageView class NoAnimPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageView) { - override fun onAnimStart() { - startScroll(touchX.toInt(), 0, 0, 0) - } - - override fun onDraw(canvas: Canvas) { - } - override fun onAnimStop() { + override fun onAnimStart() { if (!isCancel) { pageView.fillPage(mDirection) } + stopScroll() } + } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt index e85a073cf..4173ffb09 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/delegate/PageDelegate.kt @@ -126,7 +126,7 @@ abstract class PageDelegate(protected val pageView: PageView) : pageView.invalidate() } - private fun stopScroll() { + protected fun stopScroll() { isStarted = false pageView.post { isMoved = false