pull/1759/head
kunfei 3 years ago
parent 492e3241e6
commit f377f3ca5c
  1. 3
      app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt

@ -183,6 +183,9 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
bookData.value!!.changeTo(newBook, toc)
bookData.postValue(newBook)
chapterListData.postValue(toc)
if (inBookshelf) {
appDb.bookChapterDao.insert(*toc.toTypedArray())
}
}.onFinally {
postEvent(EventBus.SOURCE_CHANGED, newBook.bookUrl)
}

Loading…
Cancel
Save