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 f06e41d02d..9035c60142 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 @@ -471,9 +471,11 @@ class TEIDataFragment : FragmentGlobalAbstract(), TEIDataContracts.View { } override fun updateEnrollment(update: Boolean) { - presenter.fetchEvents(update) - presenter.getEnrollment()?.let { eventAdapter?.setEnrollment(it) } - dashboardViewModel.updateDashboard() + if(update) { + presenter.fetchEvents(update) + presenter.getEnrollment()?.let { eventAdapter?.setEnrollment(it) } + dashboardViewModel.updateDashboard() + } } companion object {