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