Skip to content

Commit

Permalink
Merge pull request feelfreelinux#186 from otwarty-wykop-mobilny/search
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszkwiecinski authored Feb 4, 2022
2 parents 408d5de + f3fd78b commit 20abc63
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class SearchFragment : BaseFragment(R.layout.activity_search) {

callback()
searchView.clearFocus()
querySubject.onNext(query)
querySubject.onNext(URLEncoder.encode(query, "UTF-8"))
activity?.hideKeyboard()

return true
Expand All @@ -92,7 +92,7 @@ class SearchFragment : BaseFragment(R.layout.activity_search) {
override fun onQueryTextChange(newText: String?): Boolean {
val results = runBlocking {
val searchDetails = getSearchDetails().first()
searchDetails.onQueryChanged(URLEncoder.encode(newText, "UTF-8"))
searchDetails.onQueryChanged(newText.orEmpty())
getSearchDetails().first().searchResults.map { it.text }
}
suggestionsAdapter.clear()
Expand Down

0 comments on commit 20abc63

Please sign in to comment.