from the outside of the library with groupid = androidx.navigation
is there a better way to tackle that?
i
Ian Lake
02/15/2024, 10:28 PM
That still won't clear any saved back stacks (destinations you've saved with
saveState
ala bottom navs) - that's why that's the wrong API to use, even if it was public
Ian Lake
02/15/2024, 10:29 PM
What you need is the parent ViewModelStoreOwner to be cleared. That could be when a Fragment that owns the ComposeView is removed from its FragmentManager or the whole activity is finished
Ian Lake
02/15/2024, 10:30 PM
But adding and removing a View isn't enough, even in the View world (that's why things like Fragments exist)