From 6999185d3c8685969a2d14b8cbe1b61692c11b46 Mon Sep 17 00:00:00 2001 From: Yusuf Abdallah <62337264+yuzalsif@users.noreply.github.com> Date: Thu, 2 May 2024 12:14:40 +0300 Subject: [PATCH] fix: Fix a constant re-creation of TEIDataFragment to show program stages (#3620) --- .../dashboardfragments/teidata/TEIDataFragment.kt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataFragment.kt b/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataFragment.kt index 77b0965fa2..806c1c589a 100644 --- a/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataFragment.kt +++ b/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataFragment.kt @@ -98,7 +98,6 @@ class TEIDataFragment : FragmentGlobalAbstract(), TEIDataContracts.View { private val dashboardViewModel: DashboardViewModel by activityViewModels() private val dashboardActivity: TEIDataActivityContract by lazy { context as TEIDataActivityContract } - private var showAllEnrollment = false private var programUid: String? = null override fun onAttach(context: Context) { @@ -139,7 +138,6 @@ class TEIDataFragment : FragmentGlobalAbstract(), TEIDataContracts.View { } noEnrollmentSelected.observe(viewLifecycleOwner) { noEnrollmentSelected -> if (noEnrollmentSelected) { - showAllEnrollment = true showLegacyCard(dashboardModel.value as DashboardTEIModel) } else { showDetailCard() @@ -296,9 +294,6 @@ class TEIDataFragment : FragmentGlobalAbstract(), TEIDataContracts.View { override fun onResume() { super.onResume() presenter.init() - if (!showAllEnrollment) { - dashboardViewModel.updateDashboard() - } } override fun onPause() {