@ -375,7 +375,6 @@ class ReadBookActivity : BaseActivity(R.layout.activity_book_read),
*/
override fun moveToNextChapter(upContent: Boolean): Boolean {
return if (ReadBookViewModel.durChapterIndex < ReadBookViewModel.chapterSize - 1) {
ReadBookViewModel.durPageIndex = 0
ReadBookViewModel.moveToNextChapter(upContent)
ReadBookViewModel.saveRead()
curChapterChanged()
@ -115,6 +115,8 @@ object ReadBookViewModel {
}
fun moveToNextChapter(upContent: Boolean) {
if (durChapterIndex < chapterSize - 1) {
durPageIndex = 0
durChapterIndex++
prevTextChapter = curTextChapter
curTextChapter = nextTextChapter
@ -134,6 +136,7 @@ object ReadBookViewModel {
fun moveToPrevChapter(upContent: Boolean) {
durChapterIndex--