flatten
fun StateFlow<Map<RoomId, StateFlow<Room?>>>.flatten(throttle: Duration = 200.milliseconds, filterUpgradedRooms: Boolean = true): 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 throttled by default.