pull/49/head
kunfei 5 years ago
parent 6381b8d1b6
commit f6303cc354
  1. 1
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  2. 3
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -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--

Loading…
Cancel
Save