Skip to content

Commit

Permalink
avoid unnecessary refreshes of the input field
Browse files Browse the repository at this point in the history
  • Loading branch information
gbasile committed Aug 1, 2019
1 parent aea3e85 commit 033fbe0
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ internal class SearchActivity : AppCompatActivity(),
override fun render(state: SearchState) {
when (state) {
is Content -> {
if (searchInput.currentQuery != state.queryString) {
searchInput.currentQuery = state.queryString
}
resultsView.showResults(state.results)
}
}
Expand Down

0 comments on commit 033fbe0

Please sign in to comment.