pull/32/head
kunfei 5 years ago
parent 00dbba3898
commit 811191e153
  1. 8
      app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt

@ -49,10 +49,12 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
fun loadContent(book: Book, index: Int) {
App.db.bookChapterDao().getChapter(book.bookUrl, index)?.let { chapter ->
BookHelp.getContent(book, chapter)?.let {
execute {
App.db.bookChapterDao().getChapter(book.bookUrl, index)?.let { chapter ->
BookHelp.getContent(book, chapter)?.let {
} ?: download(book, chapter)
} ?: download(book, chapter)
}
}
}

Loading…
Cancel
Save