flatten
fun StateFlow<Map<RoomId, StateFlow<Room?>>>.flatten(debounceTimeout: Duration = 200.milliseconds): Flow<Set<Room>>
This collects all rooms, so when one room changes, a new room set gets emitted. A change of the outer flow results in new collect of the inner flows. Because this is an expensive operation, the outer flow is debounced by default.