From ffbfc59ed5ab7efea4230b7bc67318bcdd79c3bf Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 26 Aug 2019 21:01:44 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/readbook/ReadBookActivity.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt index df79ef9e1..b5cecfe0d 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt @@ -330,16 +330,14 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_rea override fun moveToNextChapter() { viewModel.durPageIndex = 0 viewModel.moveToNextChapter() + viewModel.saveRead() curChapterChanged() } override fun moveToPrevChapter(last: Boolean) { - viewModel.durPageIndex = if (last) { - viewModel.prevTextChapter?.lastIndex() ?: 0 - } else { - 0 - } + viewModel.durPageIndex = if (last) viewModel.prevTextChapter?.lastIndex() ?: 0 else 0 viewModel.moveToPrevChapter() + viewModel.saveRead() curChapterChanged() }