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

Fills NavigationResult Exception for Navigations where CanNavigate is false #1919

Merged

Conversation

akamud
Copy link
Contributor

@akamud akamud commented Oct 1, 2019

Description of Change

This makes NavigationService.Push return a NavigationResult with a NavigationException when the navigation is cancelled via IConfirmNavigation/IConfirmNavigationAsync's CanNavigate method.

Bugs Fixed

API Changes

None

Behavioral Changes

If a ViewModel tries to navigate and CanNavigate returns false, it will now return a NavigationResult with a NavigationException and Success = false. This makes Push consistent with the same behavior in Back and BackToRoot.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard

@brianlagunas
Copy link
Member

Even though our automated build is broken, I'll merge this because it works locally. Thank you so much for the unit tests!

@brianlagunas brianlagunas merged commit a4c131a into PrismLibrary:master Oct 3, 2019
@lock
Copy link

lock bot commented Jan 28, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[XF] CanNavigate never returns Success = false for NavigateAsync
2 participants