You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, the accountType retrieved by the navBackStackEntry in the Rally app of the Navigation Codelab only works the first time. Afterwards, no matter which account I click, it goes to the single account I clicked the first time. The accountType value doesn't change :( Any help would be welcomed.
The text was updated successfully, but these errors were encountered:
jlgconde
changed the title
Arguments retrieved by navBackStackEntry
[NavigationCodelab] Arguments retrieved by navBackStackEntry
Nov 3, 2022
Hi, I've commented the restoreState = true line that is part of the solution and the app works properly now. I would like to understand what's happening and why, if this is just a mistake in the codelab and if so what's the proposed solution. Thanks in advance for any support!
Hi, I've commented the restoreState = true line that is part of the solution and the app works properly now. I would like to understand what's happening and why, if this is just a mistake in the codelab and if so what's the proposed solution. Thanks in advance for any support!
The bug happens because NavHost isn't able to treat the routes "accounts/Checking", "accounts/Home Savings", etc. as different routes, and it is restoring the state of the route ignoring the argument.
The best solution for this is set inclusive parameter to true inside the popUpTo call. This way NavHost will see the argument of your route too.
Hi, the accountType retrieved by the navBackStackEntry in the Rally app of the Navigation Codelab only works the first time. Afterwards, no matter which account I click, it goes to the single account I clicked the first time. The accountType value doesn't change :( Any help would be welcomed.
The text was updated successfully, but these errors were encountered: