Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Fix iOS so if you remove more than one page it's able to remove them successfully #14383

Merged
merged 5 commits into from
Jul 5, 2021

Conversation

PureWeen
Copy link
Contributor

Description of Change

When you set the ViewControllers property on UINavigationController it doesn't take right away. If you retrieve the ViewControllers it will still contain the ViewController you just removed. This means if you do something like

ViewControllers = ViewControllers.Remove(vc1)
ViewControllers = ViewControllers.Remove(vc2)  // This will add back in vc1 

So when processing a navigation with removes/inserts we now save local copy of pending changes.

Issues Resolved

Platforms Affected

  • Core/XAML (all platforms)
  • iOS

Testing Procedure

  • unit tests included
  • UI Tests included

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

// ViewControllers = ViewControllers.Remove(vc1)
// ViewControllers = ViewControllers.Remove(vc2)
// You've now added vc1 back because the second call to ViewControllers will still return a ViewControllers list with vc1 in it
UIViewController[] _pendingViewControllers;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the file with most of the changes relevant to the PR

@PureWeen PureWeen added this to Issue In progress in 5.0.0 SR 4 (Planning) via automation Jun 30, 2021
@PureWeen PureWeen moved this from Issue In progress to PR Needs Review in 5.0.0 SR 4 (Planning) Jun 30, 2021
@rmarinho rmarinho merged commit 86db848 into 5.0.0 Jul 5, 2021
5.0.0 SR 4 (Planning) automation moved this from PR Needs Review to Done Jul 5, 2021
@rmarinho rmarinho deleted the fix_ios_back_button branch July 5, 2021 16:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
2 participants