|
|
|
@ -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>) { |
|
|
|
|