Loading app/src/main/java/foundation/e/apps/application/ApplicationFragment.kt +23 −0 Original line number Diff line number Diff line Loading @@ -749,6 +749,29 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) { } } /** * It takes fair amount of time to load trackers information after loading app details. * Till trackers are loaded, we should show loading icon for privacy info. * * Issue: https://gitlab.e.foundation/e/os/backlog/-/issues/656 * * @param visible Boolean to toggle visibility of loading progress bar or the * layout contents. */ private fun togglePrivacyInfo(visible: Boolean) { binding.privacyInclude.run { (if (visible) View.VISIBLE else View.INVISIBLE).run { appPermissions.visibility = this appTrackers.visibility = this } loadingBar.isVisible = !visible } binding.ratingsInclude.appPrivacyScoreLayout.run { findViewById<View>(R.id.loadingBar).isVisible = !visible findViewById<View>(R.id.appPrivacyScore).isVisible = visible } } override fun onDestroyView() { super.onDestroyView() _binding?.recyclerView?.adapter = null Loading Loading
app/src/main/java/foundation/e/apps/application/ApplicationFragment.kt +23 −0 Original line number Diff line number Diff line Loading @@ -749,6 +749,29 @@ class ApplicationFragment : TimeoutFragment(R.layout.fragment_application) { } } /** * It takes fair amount of time to load trackers information after loading app details. * Till trackers are loaded, we should show loading icon for privacy info. * * Issue: https://gitlab.e.foundation/e/os/backlog/-/issues/656 * * @param visible Boolean to toggle visibility of loading progress bar or the * layout contents. */ private fun togglePrivacyInfo(visible: Boolean) { binding.privacyInclude.run { (if (visible) View.VISIBLE else View.INVISIBLE).run { appPermissions.visibility = this appTrackers.visibility = this } loadingBar.isVisible = !visible } binding.ratingsInclude.appPrivacyScoreLayout.run { findViewById<View>(R.id.loadingBar).isVisible = !visible findViewById<View>(R.id.appPrivacyScore).isVisible = visible } } override fun onDestroyView() { super.onDestroyView() _binding?.recyclerView?.adapter = null Loading