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 7ed316cfc..4184ee895 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 @@ -47,7 +47,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { } val count = App.db.bookChapterDao().getChapterCount(bookUrl) if (count == 0) { - webBook?.getChapterList(book) + webBook?.getChapterList(book, this) ?.onSuccess(IO) { cList -> if (!cList.isNullOrEmpty()) { App.db.bookChapterDao().insert(*cList.toTypedArray()) @@ -108,7 +108,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { } private fun download(book: Book, chapter: BookChapter) { - webBook?.getContent(book, chapter) + webBook?.getContent(book, chapter, scope = this) ?.onSuccess(IO) { content -> content?.let { BookHelp.saveContent(book, chapter, it)