pull/32/head
kunfei 5 years ago
parent 503850b690
commit d2818eead7
  1. 1
      app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt

@ -209,6 +209,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
bookData.value?.let { bookData.value?.let {
App.db.bookDao().delete(it.bookUrl) App.db.bookDao().delete(it.bookUrl)
} }
App.db.bookDao().insert(book)
bookData.postValue(book) bookData.postValue(book)
bookSource = App.db.bookSourceDao().getBookSource(book.origin) bookSource = App.db.bookSourceDao().getBookSource(book.origin)
if (book.tocUrl.isEmpty()) { if (book.tocUrl.isEmpty()) {

Loading…
Cancel
Save