Unless I'm missing something, the current implementation of awaitViewModelStart doesn't do anything, as take isn't a terminal operator.
/**
* Suspend until the ViewModel has started
*/
public suspend inline fun <Inputs : Any, Events : Any, State : Any> Flow<BallastNotification<Inputs, Events, State>>.awaitViewModelStart() {
filter {
it is BallastNotification.ViewModelStatusChanged<Inputs, Events, State> && it.status == Status.Running
}.take(1)
}
Oh dang, you're right, nice catch. Looks like I accidentally switched it from first() to take(1) with the 3.0.0 release. I'll get a fix released shortly
Unless I'm missing something, the current implementation of
awaitViewModelStart
doesn't do anything, astake
isn't a terminal operator.