In my navigation, I have something like this:
When I open registrationFragment (in entry_graph) from a deep-link, and finish registration, I am navigated to main_graph (MainFragment).
From there, I can access to menuFragment and click on logOut, which calls:
MainFragmentDirections.actionMainFragmentToEntryFragment()
It opens the registrationFragment instead of loginFragment. I do not expect that since loginFragment is the home fragment on that graph.
When I have similar navigation but not using deep-links, it works as it should, it opens the first fragment in that graph, but with this deep-link flow, it always opens the fragment that was opened by the deep-link, no mater where it is positioned in the navigation graph.
I have searched for solutions on SO and web, but could not find the same problem anywhere.
I have tried removing it manually from back-stack and similar solutions but I could not succeed, it always opens the fragment that was opened by the deep-link in first place.
I am using navigation version 2.1.0, but tested this flow on the currently latest 2.2.0 and it behaves the same.
Does anybody knows if there is a solution for this navigating flow?