diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt index 4d5233e7b..a19467341 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt @@ -24,6 +24,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { var webBook: WebBook? = null var callBack: CallBack? = null var durChapterIndex = 0 + var durPageIndex = 0 var isLocalBook = true var prevTextChapter: TextChapter? = null var curTextChapter: TextChapter? = null @@ -38,6 +39,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { App.db.bookDao().getBook(bookUrl)?.let { book -> bookData.postValue(book) durChapterIndex = book.durChapterIndex + durPageIndex = book.durChapterPos isLocalBook = book.origin == BookType.local bookSource = App.db.bookSourceDao().getBookSource(book.origin) bookSource?.let {