diff --git a/app/src/main/java/io/legado/app/ui/search/SearchViewModel.kt b/app/src/main/java/io/legado/app/ui/search/SearchViewModel.kt index acdc64c86..86df445b5 100644 --- a/app/src/main/java/io/legado/app/ui/search/SearchViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/search/SearchViewModel.kt @@ -16,23 +16,6 @@ class SearchViewModel(application: Application) : BaseViewModel(application) { val searchBooks: LiveData> = MutableLiveData() fun search(start: (() -> Unit)? = null, finally: (() -> Unit)? = null) { -// launchOnUI( -// { -// start?.let { it() } -// val searchResponse = withContext(IO) { -// val response: Deferred = HttpHelper.getApiService( -// "http://www.baidu.com" -// ).get("http://www.baidu.com") -// -// } -// -//// val result = searchResponse.await() -//// -//// println(result) -// }, -// { error { "${it.message}" } }, -// { finally?.let { it() } }) - execute { val response: String = HttpHelper.getApiService( "http://www.baidu.com"