Skip to content

Commit

Permalink
comment added
Browse files Browse the repository at this point in the history
  • Loading branch information
103sbavert committed Dec 26, 2020
1 parent 1605bba commit 0c7fcec
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -118,6 +118,8 @@ class MainFragment : Fragment(R.layout.fragment_main), RecentQueriesAdapter.View

private fun updateRecyclerView() {
viewModel.allQueries.observe(viewLifecycleOwner) {

//making the error message visible if the list empty, hiding it again if it is not empty
fragmentMainBinding.noRecentQueries.visibility = if (it.isNotEmpty()) View.GONE else View.VISIBLE
adapter.submitList(it)
}
Expand Down

0 comments on commit 0c7fcec

Please sign in to comment.