mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
Merge pull request #2331 from Bnyro/master
fix reversed search suggestions
This commit is contained in:
commit
724d75538e
@ -69,14 +69,13 @@ class SearchFragment : BaseFragment() {
|
|||||||
val response = try {
|
val response = try {
|
||||||
RetrofitInstance.api.getSuggestions(query)
|
RetrofitInstance.api.getSuggestions(query)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
println(e)
|
|
||||||
Log.e(TAG(), e.toString())
|
Log.e(TAG(), e.toString())
|
||||||
return@launchWhenCreated
|
return@launchWhenCreated
|
||||||
}
|
}
|
||||||
// only load the suggestions if the input field didn't get cleared yet
|
// only load the suggestions if the input field didn't get cleared yet
|
||||||
val suggestionsAdapter =
|
val suggestionsAdapter =
|
||||||
SearchSuggestionsAdapter(
|
SearchSuggestionsAdapter(
|
||||||
response,
|
response.reversed(),
|
||||||
(activity as MainActivity).searchView
|
(activity as MainActivity).searchView
|
||||||
)
|
)
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user