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

Make no history work with nested stacks #2350

Merged
merged 3 commits into from
Nov 6, 2017

Conversation

martijn00
Copy link
Contributor

@martijn00 martijn00 commented Nov 3, 2017

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Fixes replacing root not working in a lot of situations.

⤵️ What is the current behavior?

The current navigation root is not replaced.

🆕 What is the new behavior (if this is a feature change)?

It is now correctly replaced.

💥 Does this PR introduce a breaking change?

No

🐛 Recommendations for testing

Set NoHistory = true in one of the pages and run the playground sample.

📝 Links to relevant issues/docs

Fixes #2320

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated (docs style guide)
  • Nuspec files were updated (when applicable)
  • Rebased onto current develop

@martijn00 martijn00 added this to the 5.4.1 milestone Nov 3, 2017
@Cheesebaron
Copy link
Member

How to test this? Which cases does it fix?

@martijn00
Copy link
Contributor Author

Updated description.

@Cheesebaron
Copy link
Member

On Forms.iOS. If I set NoHistory = true on ChildPage. The back button is briefly visible. Looks very strange.

@martijn00
Copy link
Contributor Author

@Cheesebaron You've got to set Animated = false to prevent that. This is iOS + Forms behavior.

@@ -172,8 +172,9 @@ public virtual void RegisterAttributeTypes(Dictionary<Type, MvxPresentationAttri
if (attribute.WrapInNavigationPage && FormsApplication.MainPage is MvxNavigationPage currentPage)
{
if (attribute.NoHistory)
Copy link
Member

Choose a reason for hiding this comment

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

This if pattern seems duplicated a lot of places in this class. Can we encapsulate this please?

@martijn00 martijn00 merged commit 5e2874a into MvvmCross:develop Nov 6, 2017
@martijn00 martijn00 deleted the forms-nohistory branch December 11, 2017 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Xamarin.Forms / Setting NoHistory member has no effect
2 participants