Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remember keys in rememberSaveableBackStack #1326

Merged
merged 2 commits into from
Apr 5, 2024
Merged

Remember keys in rememberSaveableBackStack #1326

merged 2 commits into from
Apr 5, 2024

Conversation

JustinBis
Copy link
Contributor

@JustinBis JustinBis commented Apr 4, 2024

Updates rememberSaveableBackStack to use use the initial root screen(s) as keys.

Before this, you could never get a new backstack when using rememberSaveableBackStack. This blocks using navigable Circuits within views that may have their root screen change, such as a ComposeView in a RecyclerView or other XML layout that has data being rebound.

This includes a small test suite to cover both remember cases and NavigableCircuitContent.

Copy link

salesforce-cla bot commented Apr 4, 2024

Thanks for the contribution! Before we can merge this, we need @JustinBis to sign the Salesforce Inc. Contributor License Agreement.

Copy link
Collaborator

@ZacSweers ZacSweers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the tests too!

@ZacSweers ZacSweers enabled auto-merge April 4, 2024 23:10
auto-merge was automatically disabled April 4, 2024 23:21

Head branch was pushed to by a user without write access

@JustinBis
Copy link
Contributor Author

@ZacSweers will need another auto-merge approval, had to run the formatter

@ZacSweers ZacSweers enabled auto-merge April 4, 2024 23:51
@ZacSweers ZacSweers added this pull request to the merge queue Apr 5, 2024
Merged via the queue into slackhq:main with commit e15db45 Apr 5, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants