pull/274/head
gedoor 4 years ago
parent 446c951a2a
commit c3399fdf4a
  1. 8
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -114,8 +114,12 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
App.db.bookChapterDao().insert(*it.toTypedArray())
App.db.bookDao().update(book)
ReadBook.chapterSize = it.size
ReadBook.upMsg(null)
ReadBook.loadContent(resetPageOffset = true)
if (it.isEmpty()) {
ReadBook.upMsg(context.getString(R.string.error_load_toc))
} else {
ReadBook.upMsg(null)
ReadBook.loadContent(resetPageOffset = true)
}
}
} else {
ReadBook.webBook?.getChapterList(book, this)

Loading…
Cancel
Save