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

@ -79,12 +79,13 @@ class SearchModel(private val scope: CoroutineScope, private val callBack: CallB
}
searchIndex++
val source = bookSourceList[searchIndex]
searchPool?.let { searchPool ->
val task = WebBook.searchBook(
scope,
source,
searchKey,
searchPage,
context = searchPool!!
context = searchPool
).timeout(30000L)
.onSuccess(searchPool) {
onSuccess(searchId, it)
@ -94,6 +95,7 @@ class SearchModel(private val scope: CoroutineScope, private val callBack: CallB
}
tasks.add(task)
}
}
@Synchronized
private fun onSuccess(searchId: Long, items: ArrayList<SearchBook>) {

Loading…
Cancel
Save