From 3bd74545be09844dd1709130332bca0f8bb0df99 Mon Sep 17 00:00:00 2001 From: Jean-BaptisteC Date: Sun, 26 Nov 2023 17:32:05 +0100 Subject: [PATCH] Improve visibility --- .../exodusprivacy/fragments/apps/AppsFragment.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/apps/AppsFragment.kt b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/apps/AppsFragment.kt index 92bc3481..b4e4b663 100644 --- a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/apps/AppsFragment.kt +++ b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/fragments/apps/AppsFragment.kt @@ -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 @@ -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 @@ -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 } } @@ -135,7 +138,6 @@ class AppsFragment : Fragment(R.layout.fragment_apps) { action = ExodusUpdateService.START_SERVICE activity?.startService(this) } - binding.progress.visibility = View.VISIBLE } } }