Skip to content

Commit

Permalink
Improve visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-BaptisteC committed Nov 27, 2023
1 parent d4f8d46 commit 3bd7454
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class AppsFragment : Fragment(R.layout.fragment_apps) {
reenterTransition = MaterialFadeThrough()
returnTransition = MaterialFadeThrough()

val progressBar = binding.progress
val updateReportsFab = binding.updateReportsFAB

// Setup menu actions
Expand Down Expand Up @@ -94,7 +95,7 @@ class AppsFragment : Fragment(R.layout.fragment_apps) {
if (!it.isNullOrEmpty()) {
binding.swipeRefreshLayout.visibility = View.VISIBLE
binding.shimmerLayout.visibility = View.GONE
binding.progress.visibility = View.GONE
progressBar.visibility = View.GONE
appsRVAdapter.submitList(it)
} else {
binding.swipeRefreshLayout.visibility = View.VISIBLE
Expand All @@ -105,10 +106,12 @@ class AppsFragment : Fragment(R.layout.fragment_apps) {
binding.swipeRefreshLayout.setOnRefreshListener {
binding.swipeRefreshLayout.isRefreshing = false
updateReports(view.context)
progressBar.visibility = View.VISIBLE
}

updateReportsFab.setOnClickListener {
updateReports(view.context)
progressBar.visibility = View.VISIBLE
}
}

Expand All @@ -135,7 +138,6 @@ class AppsFragment : Fragment(R.layout.fragment_apps) {
action = ExodusUpdateService.START_SERVICE
activity?.startService(this)
}
binding.progress.visibility = View.VISIBLE
}
}
}

0 comments on commit 3bd7454

Please sign in to comment.