From b3b4bf656f835631fe89081e98ee67fd5c19f973 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 19 Aug 2019 14:13:04 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/changesource/ChangeSourceViewModel.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt index bfb71d5ad..9d161099b 100644 --- a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceViewModel.kt @@ -8,7 +8,6 @@ import io.legado.app.base.BaseViewModel import io.legado.app.data.entities.Book import io.legado.app.data.entities.SearchBook import io.legado.app.model.WebBook -import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers.IO import kotlinx.coroutines.launch import org.jetbrains.anko.debug @@ -48,7 +47,7 @@ class ChangeSourceViewModel(application: Application) : BaseViewModel(applicatio //task取消时自动取消 by (scope = this@execute) WebBook(item).searchBook(name, scope = this@execute) .timeout(30000L) - .onSuccess(Dispatchers.IO) { + .onSuccess(IO) { it?.let { list -> for (searchBook in list) { if (searchBook.name == name && searchBook.author == author) {