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

Android navigation: add a way to pop the root #18

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

sdetilly
Copy link
Contributor

This functionality becomes necessary when the Pilot navigation stack is not implemented at the app's root level but is instead utilized within a specific app section. Given that the navigation stack might be integrated within a navigation controller or displayed in a modally, the responsibility to close the stack must be transferred to the caller.

To address this requirement, an optional closure named "onRootPop" has been introduced as an override for PilotNavControllerNavigationListener, enabling a flexible approach to close the stack.

Copy link
Member

@npresseault npresseault left a comment

Choose a reason for hiding this comment

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

On iOS, that is handled with a closure on the Navigation object instead but I think subclassing is a good option here for that use case. I don't object to that API.

@sdetilly sdetilly merged commit b1ff345 into main Jul 24, 2024
1 check passed
@sdetilly sdetilly deleted the android-navigation-rootpop branch July 24, 2024 18:38
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.

2 participants