|
|
|
@ -20,7 +20,6 @@ class SearchViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
|
private var task: Coroutine<*>? = null |
|
|
|
|
var callBack: CallBack? = null |
|
|
|
|
var searchKey: String = "" |
|
|
|
|
var startTime: Long = 0 |
|
|
|
|
var searchPage = 1 |
|
|
|
|
var isLoading = false |
|
|
|
|
private var searchBooks = arrayListOf<SearchBook>() |
|
|
|
@ -38,7 +37,6 @@ class SearchViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
|
searchKey = key |
|
|
|
|
searchBooks.clear() |
|
|
|
|
} |
|
|
|
|
startTime = System.currentTimeMillis() |
|
|
|
|
callBack?.startSearch() |
|
|
|
|
task = execute { |
|
|
|
|
val searchGroup = context.getPrefString("searchGroup") ?: "" |
|
|
|
|