pull/52/head
kunfei 5 years ago
parent c01468f529
commit 97f9b1575c
  1. 3
      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.IntentHelp
import io.legado.app.help.coroutine.Coroutine import io.legado.app.help.coroutine.Coroutine
import io.legado.app.model.WebBook import io.legado.app.model.WebBook
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.asCoroutineDispatcher import kotlinx.coroutines.asCoroutineDispatcher
import java.util.concurrent.Executors import java.util.concurrent.Executors
@ -55,7 +56,7 @@ class DownloadService : BaseService() {
.onStart { .onStart {
updateNotification(chapter.title) updateNotification(chapter.title)
} }
.onSuccess { content -> .onSuccess(IO) { content ->
content?.let { content?.let {
BookHelp.saveContent(book, chapter, content) BookHelp.saveContent(book, chapter, content)
} }

Loading…
Cancel
Save