parth
01/15/2021, 2:27 PMmarstran
01/15/2021, 2:55 PMfun <T> Flow<T>.skipUntil(flow: Flow<*>): Flow<T> = channelFlow {
val isSkipping = MutableStateFlow(true)
launch {
collect { if (!isSkipping.value) send(it) }
}
val signal = flow.first()
isSkipping.value = false
}
parth
01/15/2021, 2:57 PMflosch
01/15/2021, 3:24 PMparth
01/15/2021, 3:27 PMskipUntil
, that’s why the issue didn’t show up for me. Thanks!