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() {