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