|
|
@ -330,16 +330,14 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_rea |
|
|
|
override fun moveToNextChapter() { |
|
|
|
override fun moveToNextChapter() { |
|
|
|
viewModel.durPageIndex = 0 |
|
|
|
viewModel.durPageIndex = 0 |
|
|
|
viewModel.moveToNextChapter() |
|
|
|
viewModel.moveToNextChapter() |
|
|
|
|
|
|
|
viewModel.saveRead() |
|
|
|
curChapterChanged() |
|
|
|
curChapterChanged() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun moveToPrevChapter(last: Boolean) { |
|
|
|
override fun moveToPrevChapter(last: Boolean) { |
|
|
|
viewModel.durPageIndex = if (last) { |
|
|
|
viewModel.durPageIndex = if (last) viewModel.prevTextChapter?.lastIndex() ?: 0 else 0 |
|
|
|
viewModel.prevTextChapter?.lastIndex() ?: 0 |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
viewModel.moveToPrevChapter() |
|
|
|
viewModel.moveToPrevChapter() |
|
|
|
|
|
|
|
viewModel.saveRead() |
|
|
|
curChapterChanged() |
|
|
|
curChapterChanged() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|