From 9ec2e0dd0abc08de2b0af6538b94085ded5fc03c Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Thu, 4 May 2023 16:04:36 +0600 Subject: [PATCH] 6817-fix_noUpdate_page_showing_wrongly issue: https://gitlab.e.foundation/e/backlog/-/issues/6817 --- .../java/foundation/e/apps/updates/UpdatesFragment.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/foundation/e/apps/updates/UpdatesFragment.kt b/app/src/main/java/foundation/e/apps/updates/UpdatesFragment.kt index b40ecd8a7..60bb51b26 100644 --- a/app/src/main/java/foundation/e/apps/updates/UpdatesFragment.kt +++ b/app/src/main/java/foundation/e/apps/updates/UpdatesFragment.kt @@ -315,7 +315,15 @@ class UpdatesFragment : TimeoutFragment(R.layout.fragment_updates), FusedAPIInte override fun stopLoadingUI() { binding.progressBar.visibility = View.GONE - binding.recyclerView.visibility = View.VISIBLE + + if ((binding.recyclerView.adapter?.itemCount ?: 0) > 0) { + binding.noUpdates.visibility = View.GONE + binding.recyclerView.visibility = View.VISIBLE + return + } + + binding.noUpdates.visibility = View.VISIBLE + binding.recyclerView.visibility = View.INVISIBLE } override fun onResume() { -- GitLab