Merge pull request #2331 from Bnyro/master

fix reversed search suggestions
This commit is contained in:
Bnyro 2022-12-10 12:50:09 +01:00 committed by GitHub
commit 724d75538e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,14 +69,13 @@ class SearchFragment : BaseFragment() {
val response = try {
RetrofitInstance.api.getSuggestions(query)
} catch (e: Exception) {
println(e)
Log.e(TAG(), e.toString())
return@launchWhenCreated
}
// only load the suggestions if the input field didn't get cleared yet
val suggestionsAdapter =
SearchSuggestionsAdapter(
response,
response.reversed(),
(activity as MainActivity).searchView
)
runOnUiThread {