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
When initializing the navigator using Navigator(screens = screenStack), it becomes impossible to change the list of screens using the same constructor. This issue becomes problematic for the implementation of deep links.
val screenStack by screenStackFlow.collectAsState()
Navigator(screens = screenStack) // screen list never changes even if screenStack changes
The only workaround I found was to use navigator.replaceAll to swap the entire stack at once.
// This worksval screenStack by screenStackFlow.collectAsState()
Navigator(screens = screenStack) {
CurrentScreen()
it.replaceAll(screenStack)
}
Expected Behavior
Once screenStack is a state and its content changes, the list of screens in the Navigator(screens = screenStack) composable should change accordingly, respecting the state.
Issue with Deep Link Implementation
Current Behavior
When initializing the navigator using
Navigator(screens = screenStack)
, it becomes impossible to change the list of screens using the same constructor. This issue becomes problematic for the implementation of deep links.The only workaround I found was to use navigator.replaceAll to swap the entire stack at once.
Expected Behavior
Once screenStack is a state and its content changes, the list of screens in the Navigator(screens = screenStack) composable should change accordingly, respecting the state.
Sample
The issue can be observed in this sample project
bugsample.zip
The text was updated successfully, but these errors were encountered: