Skip to content

Conversation

@rjrjr
Copy link
Collaborator

@rjrjr rjrjr commented Sep 13, 2024

BackStackScreen now implements Compatible and has a name: String field, just like BodyAndOverlaysScreen. This is in support of having multiple instances under a single SavedStateRegistry at a time. Our old trick of wrapping instances via NamedScreen doesn't work the the BackStackScreen creates the first classic View instance in Compose context, because the NamedScreen will be handled by Compose code. The old hack in BackStackContainer relies on View.screen holdling NamedScreen(BackStackScreen), but in the Compose-eats-NamedScreen case it will just be BackStackScreen.

@rjrjr rjrjr requested review from a team and zach-klippenstein as code owners September 13, 2024 00:30
`BackStackScreen` now implements `Compatible` and has a `name: String` field, just like `BodyAndOverlaysScreen`. This is in support of having multiple instances under a single `SavedStateRegistry` at a time. Our old trick of wrapping instances via `NamedScreen` doesn't work the the `BackStackScreen` creates the first classic `View` instance in Compose context, because the `NamedScreen` will be handled by Compose code. The old hack in `BackStackContainer` relies on `View.screen` holdling `NamedScreen(BackStackScreen)`, but in the Compose-eats-NamedScreen case it will just be `BackStackScreen`.
@rjrjr rjrjr force-pushed the ray/name-backstackscreen branch from 450def1 to fad5aa5 Compare September 13, 2024 00:49
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@rjrjr rjrjr requested a review from tcmulcahy September 13, 2024 15:55
@rjrjr rjrjr merged commit a7c1b38 into main Sep 13, 2024
@rjrjr rjrjr deleted the ray/name-backstackscreen branch September 13, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants