From 4843614fb6a86751e5b6ec69fa5c4dd3592931f5 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 27 Aug 2019 16:20:35 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt index 358ec885c..009c88979 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt @@ -53,7 +53,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { bookSource?.let { webBook = WebBook(it) } - val count = App.db.bookChapterDao().getChapterCount(bookUrl) + val count = App.db.bookChapterDao().getChapterCount(book.bookUrl) if (count == 0) { if (book.tocUrl.isEmpty()) { loadBookInfo(book) @@ -68,7 +68,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { chapterListFinish.postValue(true) } } - } + }.onError { it.printStackTrace() } } private fun loadBookInfo(book: Book) {