From 97f9b1575c784eaa053a7a94d18a78c1f6eebc42 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 3 Dec 2019 16:41:50 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/service/DownloadService.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/service/DownloadService.kt b/app/src/main/java/io/legado/app/service/DownloadService.kt index db7b1a664..d1c45a15b 100644 --- a/app/src/main/java/io/legado/app/service/DownloadService.kt +++ b/app/src/main/java/io/legado/app/service/DownloadService.kt @@ -11,6 +11,7 @@ import io.legado.app.help.BookHelp import io.legado.app.help.IntentHelp import io.legado.app.help.coroutine.Coroutine import io.legado.app.model.WebBook +import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.asCoroutineDispatcher import java.util.concurrent.Executors @@ -55,7 +56,7 @@ class DownloadService : BaseService() { .onStart { updateNotification(chapter.title) } - .onSuccess { content -> + .onSuccess(IO) { content -> content?.let { BookHelp.saveContent(book, chapter, content) }