hey folks, bit of a weird issue and I’m not sure what is the best way to go about it.
in a compose screen i can have this, simple flow collection with lifecycle STARTED
val lifecycleOwner = LocalLifecycleOwner.current
val navigationEventFlowLifecycleAware = remember(viewModel.navigationEventFlow, lifecycleOwner) {
viewModel.navigationEventFlow.flowWithLifecycle(lifecycleOwner.lifecycle, Lifecycle.State.STARTED)
}
i have a bottomsheet that opens a url, and user comes back
when this is resumed, the view sends an intent to the viewmodel
LifecycleResumeEffect(Unit) {
viewModel.intent(Intent.CheckAgain)
onPauseOrDispose {}
}
and the viewmodel then decides to close by sending an event to that flow
but the screen doesnt close because the flow is found to not be collecting yet, what is strange to me, is the flow is supposed to be collecting when lifecycle is STARTED, which happens before RESUMED, so technically this all should work
any suggestions please