Skip to content

Commit

Permalink
Merge branch 'fix/no_pull_on_empty_query'
Browse files Browse the repository at this point in the history
  • Loading branch information
noln committed Jul 19, 2019
2 parents 60f4e83 + a2f5f21 commit 9d7b694
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ abstract class SearchFragment<T> : Fragment(),
}

private fun setupSwipeRefreshLayout() {
swipeRefreshLayout.isEnabled = false
swipeRefreshLayout.setOnRefreshListener(this)
swipeRefreshLayout.setColorSchemeResources(R.color.roma_blue)
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(
Expand All @@ -70,6 +71,7 @@ abstract class SearchFragment<T> : Fragment(),

private fun subscribeObservables() {
data.observe(viewLifecycleOwner, Observer {
if (!swipeRefreshLayout.isEnabled) swipeRefreshLayout.isEnabled = true
adapter.submitList(it)
})

Expand Down

0 comments on commit 9d7b694

Please sign in to comment.