rocketraman
11/08/2023, 10:16 PMBallastNotification.ViewModelStarted to send an initial input to the view model queue. What would the replacement be now that there is no ViewModelStarted option. I see ViewModelStatusChanged, and I can do if (it.status == Status.Running) but I see that Status.Running is in an internal package. Is there a better approach now?Casey Brooks
11/08/2023, 10:20 PMnotificationFlow.awaitViewModelStart() is what you should be using. It does exactly what you described
https://github.com/copper-leaf/ballast/blob/main/ballast-api/src/commonMain/kotlin/com/copperleaf/ballast/utils.kt#L276rocketraman
11/08/2023, 10:21 PMlaunch(start = CoroutineStart.UNDISPATCHED) {
notifications.awaitViewModelStart()
val initialInput = initialInputFn()
sendToQueue(Queued.HandleInput(null, initialInput))
}Casey Brooks
11/08/2023, 10:23 PMBootstrapInterceptor if that’s all you’re doing with the interceptor https://github.com/copper-leaf/ballast/blob/main/ballast-utils/src/commonMain/kotlin/com/copperleaf/ballast/core/BootstrapInterceptor.ktrocketraman
11/08/2023, 10:23 PM