-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix string constructor for ShellNavigationState #13478
Conversation
@@ -637,6 +643,296 @@ public async Task InitialNavigatingArgs() | |||
null, "//item"); | |||
} | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of this is just moving code to the correct file. No changes happen here
public class ShellNavigationStateTests : ShellTestBase | ||
{ | ||
[Test] | ||
public void LocationInitializedWithUri() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These Tests are new
@@ -16,201 +16,6 @@ public override void TearDown() | |||
Routing.Clear(); | |||
} | |||
|
|||
[Test] | |||
public async Task RouteWithGlobalPageRoute() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of this is just moving code to the correct file. No changes happen here
public ShellNavigationState(Uri location) | ||
{ | ||
FullLocation = location; | ||
Location = TrimDownImplicitAndDefaultPaths(FullLocation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the primary change from this PR
@@ -852,7 +852,7 @@ protected override bool OnBackButtonPressed() | |||
return true; | |||
} | |||
|
|||
var args = new ShellNavigatingEventArgs(this.CurrentState, "", ShellNavigationSource.Pop, true); | |||
var args = new ShellNavigatingEventArgs(this.CurrentState, new ShellNavigationState(""), ShellNavigationSource.Pop, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is just so we're avoiding using the implicit operator
@@ -36,7 +36,7 @@ public async Task GoToAsync(ShellNavigationParameters shellNavigationParameters) | |||
if (shellNavigationParameters.PagePushing != null) | |||
Routing.RegisterImplicitPageRoute(shellNavigationParameters.PagePushing); | |||
|
|||
ShellNavigationState state = shellNavigationParameters.TargetState ?? Routing.GetRoute(shellNavigationParameters.PagePushing); | |||
var state = shellNavigationParameters.TargetState ?? new ShellNavigationState(Routing.GetRoute(shellNavigationParameters.PagePushing), false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is just so we're avoiding using the implicit operator
@@ -1063,7 +1063,7 @@ protected override async Task<Page> OnPopAsync(bool animated) | |||
var navigationParameters = new ShellNavigationParameters() | |||
{ | |||
Animated = animated, | |||
TargetState = ".." | |||
TargetState = new ShellNavigationState("..") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is just so we're avoiding using the implicit operator
Failing tests not related |
Description of Change
Fix string constructor for ShellNavigationState so it sets both Location and FullLocation
Issues Resolved
Platforms Affected
Testing Procedure
PR Checklist