|
|
|
@ -20,6 +20,7 @@ class SearchViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
|
val search = WebBook(item).searchBook(key, searchPage) |
|
|
|
|
.onSuccess { searchBookS -> |
|
|
|
|
searchBookS?.let { |
|
|
|
|
execute { |
|
|
|
|
for (searchBook in searchBookS) { |
|
|
|
|
when (key) { |
|
|
|
|
searchBook.name -> searchBook.searchOrder = 0 |
|
|
|
@ -30,9 +31,12 @@ class SearchViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
tasks.add(search) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}.onError { |
|
|
|
|
it.printStackTrace() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|