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 ad783aa6e9..b61978d022 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 @@ -380,9 +380,7 @@ class TEIDataFragment : FragmentGlobalAbstract(), TEIDataContracts.View { ?: emptyList(), onScheduled = { showToast(getString(R.string.event_created)) - binding.isGrouping?.let { - presenter.onGroupingChanged(it) - } + presenter.updateEventList() }, ).show(childFragmentManager, SCHEDULING_DIALOG) } 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 f738366634..7aa74aac51 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 @@ -585,4 +585,8 @@ class TEIDataPresenter( fun getTeiHeader(): String? { return teiDataRepository.getTeiHeader() } + + fun updateEventList() { + groupingProcessor.onNext(_groupEvents.value) + } }