Closed hrach closed 1 year ago
@hrach This is most definitely the business concerns of your app and not of the core navigation library. There are so many possible navigation patterns and it doesn't make sense to support them all. Maybe as some extension library, but that's another story.
I'm pretty sure you can easily build the required logic yourself in different ways. Just off the top of my head:
initialBackstack
just to a single entry and recreate the backstack only when you "navigateUp" with replace
method.Thanks for getting back to me. :) Closing
Thanks to the initialBackstack, I can parse deeplink and prepare the backstack to be able to navigateUp. However, when going from deeplink, the app should behave differently for navigateUp and for navigateBack. navigateBack should ignore the "artificial" backstack and return to the previous app. NavigateUp should correctly pop and show the previous entry from the "artificial" backstack.
I guess it is possible to somehow hack it and track how much of this stack is "artificial", but I'd say support for this should be directly in the library.
Any thoughts? Did you consider adding this? Thank you :)