(crossposting here as well)
# coroutines
p
(crossposting here as well)
m
I don't think there is such a function in kotlinx.coroutines, but it shouldn't be too hard to implement yourself.
This seems to work, although there might exist a simpler implementation:
Copy code
fun <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
}
p
ah yup, that makes sense as an impl
thank you!
f
there is actually a discussion on github about such operators: https://github.com/Kotlin/kotlinx.coroutines/issues/1850
p
ah, i was searching for
skipUntil
, that’s why the issue didn’t show up for me. Thanks!