@ -611,7 +611,9 @@ class ReadBookActivity : ReadBookBaseActivity(),
autoPageProgress += scrollOffset
if (autoPageProgress >= binding.readView.height) {
autoPageProgress = 0
binding.readView.fillPage(PageDirection.NEXT)
if (!binding.readView.fillPage(PageDirection.NEXT)) {
autoPageStop()
}
} else {
binding.readView.invalidate()
@ -437,15 +437,15 @@ class ReadView(context: Context, attrs: AttributeSet) :
curPage.cancelSelect()
fun fillPage(direction: PageDirection) {
when (direction) {
fun fillPage(direction: PageDirection): Boolean {
return when (direction) {
PageDirection.PREV -> {
pageFactory.moveToPrev(true)
PageDirection.NEXT -> {
pageFactory.moveToNext(true)
else -> Unit
else -> false