Christoph Wiesner
11/07/2022, 9:51 AMprivate var currentRoleSelection = mutableStateOf<UserRole>(null)
i want to have a initial selection for currentRoleSelection
(let's say the first role in the list)
but i have to wait for the userRoles to be queried from the DB
val uiState: StateFlow<UiState> = combine(
userRoles, // Flow<UserRole>
//other flows,
snapshotFlow { currentRole }
) { ... -> }
how would i set the mutableState once the DB roles are queried?
do i need to "convert" that userRoles to a state as well in order to use sth like derivedStateOf{}
?