pull/32/head
kunfei 5 years ago
parent 091755b50d
commit b3b4bf656f
  1. 3
      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) {

Loading…
Cancel
Save