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 adc311adc..e618f96d6 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 @@ -32,7 +32,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { val count = App.db.bookChapterDao().getChapterCount(bookUrl) if (count == 0) { webBook?.getChapterList(book) - ?.onSuccess { cList -> + ?.onSuccess(IO) { cList -> cList?.let { App.db.bookChapterDao().insert(*cList.toTypedArray()) chapterMaxIndex.postValue(cList.size)