From b990688940e617b40227b22067ba13a2b201af8f Mon Sep 17 00:00:00 2001 From: Pablo Date: Wed, 14 Feb 2024 08:24:31 +0100 Subject: [PATCH] fix landscape event loading Signed-off-by: Pablo --- .../dashboardfragments/teidata/TEIDataFragment.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 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 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 {