When a NavHostEntry is removed from the stack it only emits the ON_PAUSE lifecycle event to observers
Consider the following code:
val lifecycleOwner = LocalLifecycleOwner.current
DisposableEffect(lifecycleOwner) {
val observer = LifecycleEventObserver { _, event ->
println("Event: $event")
}
lifecycleOwner.lifecycle.addObserver(observer)
onDispose {
lifecycleOwner.lifecycle.removeObserver(observer)
}
}
I would expect to receive ON_PAUSE > ON_STOP > ON_DESTROY when the entry is removed from the stack which is not the case. It would also be nice if some docs were added about how the library works in this area
When a NavHostEntry is removed from the stack it only emits the ON_PAUSE lifecycle event to observers
Consider the following code:
I would expect to receive ON_PAUSE > ON_STOP > ON_DESTROY when the entry is removed from the stack which is not the case. It would also be nice if some docs were added about how the library works in this area