I'm using `RetainObserver` with `Nav3` + the reta...
# compose
u
I'm using
RetainObserver
with
Nav3
+ the retain recipe https://github.com/android/nav3-recipes/blob/main/app/src/main/java/com/example/nav3recipes/retain/RetainActivity.kt
Copy code
class RetainedPresenterObserver<P : Presenter<*, *>>(val presenter: P) : RetainObserver {
    override fun onRetained() {
        presenter.onCreate()
    }

    override fun onEnteredComposition() {
    }

    override fun onExitedComposition() {
    }

    override fun onUnused() {
    }

    override fun onRetired() {
        presenter.onDestroy()
    }
}
and
onRetired
is not called while app is on background - and is deferred until app comes back to foreground. Why? I find this a big issue - when logout happens on background, say via push message - I need to get rid of everything on backstack thuss clearing all the Presenters & their coroutine scopes - and obviously `onDestroy`s are not getting called; without it flows inside are still collected & doing work after logical logout happens which is not good & gating every action to foreground is not feasible // Is this a nav3 or compose in general issue?
@shikasd would you mind please bumping it via your channels? its 2 weeks no reaction