From 00dbba38985ce1d1327c4f51f49568ae628fb576 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 16 Aug 2019 20:19:47 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/readbook/ReadBookViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)