<How do I emit multiple flows synchronously?> My a...
# forum
r
How do I emit multiple flows synchronously? My app has three flows, namely account, timeline, timelinePosition val activeAccountFlow = accountDao .getActiveAccountFlow() .filterNotNull() .distinctUntilChanged { old, new -> old.id == new.id } val timeline = activeAccountFlow .flatMapLatest { timelineDao.getStatusListWithFlow(it.id) } .stateIn( scope = viewModelScope, started = SharingStarted.WhileSubscribed(), initialValue = persistentListOf() ) val timelinePosition = activeAccountFlow .mapLatest {...