mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
No selected unit group bugfix
This commit is contained in:
parent
5621848c5a
commit
0ffec5e15a
@ -46,7 +46,9 @@ class SecondViewModel @Inject constructor(
|
|||||||
private val _uiStateFlow = MutableStateFlow(SecondScreenUIState())
|
private val _uiStateFlow = MutableStateFlow(SecondScreenUIState())
|
||||||
|
|
||||||
val mainFlow = combine(_uiStateFlow, unitGroupsRepository.shownUnitGroups) { uiState, shown ->
|
val mainFlow = combine(_uiStateFlow, unitGroupsRepository.shownUnitGroups) { uiState, shown ->
|
||||||
return@combine uiState.copy(shownUnitGroups = shown)
|
val newState = uiState.copy(shownUnitGroups = shown)
|
||||||
|
_uiStateFlow.value = newState
|
||||||
|
return@combine newState
|
||||||
}
|
}
|
||||||
.stateIn(
|
.stateIn(
|
||||||
scope = viewModelScope,
|
scope = viewModelScope,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user