pull/1434/head
gedoor 4 years ago
parent 3244cc9ccd
commit c1a845185c
  1. 30
      app/src/main/java/io/legado/app/model/webBook/SearchModel.kt

@ -79,20 +79,22 @@ class SearchModel(private val scope: CoroutineScope, private val callBack: CallB
} }
searchIndex++ searchIndex++
val source = bookSourceList[searchIndex] val source = bookSourceList[searchIndex]
val task = WebBook.searchBook( searchPool?.let { searchPool ->
scope, val task = WebBook.searchBook(
source, scope,
searchKey, source,
searchPage, searchKey,
context = searchPool!! searchPage,
).timeout(30000L) context = searchPool
.onSuccess(searchPool) { ).timeout(30000L)
onSuccess(searchId, it) .onSuccess(searchPool) {
} onSuccess(searchId, it)
.onFinally(searchPool) { }
onFinally(searchId) .onFinally(searchPool) {
} onFinally(searchId)
tasks.add(task) }
tasks.add(task)
}
} }
@Synchronized @Synchronized

Loading…
Cancel
Save