pull/1013/head 3.21.052622
gedoor 4 years ago
parent c96961f143
commit abd30ef58f
  1. 4
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
  2. 4
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -59,6 +59,10 @@ class BookInfoActivity :
book.durChapterPos = it.second
appDb.bookDao.update(book)
}
viewModel.chapterListData.value?.let { chapterList ->
binding.tvToc.text =
getString(R.string.toc_s, chapterList[book.durChapterIndex].title)
}
startReadActivity(book)
}
}

@ -68,9 +68,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
if (ReadBook.durChapterIndex != book.durChapterIndex) {
ReadBook.durChapterIndex = book.durChapterIndex
ReadBook.durChapterPos = book.durChapterPos
ReadBook.prevTextChapter = null
ReadBook.curTextChapter = null
ReadBook.nextTextChapter = null
ReadBook.clearTextChapter()
}
ReadBook.titleDate.postValue(book.name)
ReadBook.upWebBook(book)

Loading…
Cancel
Save