From 885e672d060818f14f4715b27bb016cb69fba02d Mon Sep 17 00:00:00 2001 From: andresmr Date: Tue, 20 Feb 2024 11:21:59 +0100 Subject: [PATCH] [ANDROAPP-5805] Add replay to mutable search flow in order to emit the first value --- .../searchparameters/model/SearchParametersUiState.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/searchparameters/model/SearchParametersUiState.kt b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/searchparameters/model/SearchParametersUiState.kt index 5ef3bff7d0a..01692d8488e 100644 --- a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/searchparameters/model/SearchParametersUiState.kt +++ b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/searchparameters/model/SearchParametersUiState.kt @@ -7,7 +7,9 @@ import org.dhis2.form.model.FieldUiModel data class SearchParametersUiState( val items: List = listOf(), val minAttributesMessage: String? = null, - private val _shouldShowMinAttributeWarning: MutableSharedFlow = MutableSharedFlow(), + private val _shouldShowMinAttributeWarning: MutableSharedFlow = MutableSharedFlow( + replay = Int.MAX_VALUE, + ), val searchEnabled: Boolean = false, val clearSearchEnabled: Boolean = false, ) {