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 08c611fc74..96daf47404 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 @@ -106,8 +106,8 @@ class TEIDataFragment : FragmentGlobalAbstract(), TEIDataContracts.View { savedInstanceState: Bundle?, ): View { return FragmentTeiDataBinding.inflate(inflater, container, false).also { binding -> + this.binding = binding dashboardViewModel.groupByStage.observe(viewLifecycleOwner) { group -> - this.binding = binding showLoadingProgress(false) presenter.onGroupingChanged(group) } diff --git a/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataPresenter.kt b/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataPresenter.kt index 0e9f11cad7..f8e3cc2985 100644 --- a/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataPresenter.kt +++ b/app/src/main/java/org/dhis2/usescases/teiDashboard/dashboardfragments/teidata/TEIDataPresenter.kt @@ -414,7 +414,7 @@ class TEIDataPresenter( fun fetchEvents(updateEnrollment: Boolean) { if (updateEnrollment) { - groupingProcessor.onNext(groupingProcessor.value) + groupingProcessor.onNext(dashboardRepository.getGrouping()) } }