oday
12/01/2022, 12:56 PMprivate val locationFilter =
BrowseEventsFilter.LocationFilter(location = MutableStateFlow(null))
private val categoryFilter =
BrowseEventsFilter.CategoryFilter(category = MutableStateFlow(null))
private val periodFilter = BrowseEventsFilter.PeriodFilter(
period = MutableStateFlow(Period.Any),
dateRange = MutableStateFlow(null)
)
val filtersState = MutableStateFlow(
listOf(
periodFilter,
locationFilter,
categoryFilter
)
)
viewModelScope.launch(<http://dispatchers.io|dispatchers.io>) {
filtersState.collect {
and in the activity
val filtersState by browseEventsViewModel.filtersState.collectAsState()
is this not enough to guarantee a recomposition if something inside filterState changes?Stylianos Gakis
12/01/2022, 3:19 PM