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

Added InvokeOnMainThreadAsync to consolidate GoToAsync calls #15366

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Xamarin.Forms.Core/Shell/ShellNavigationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ await Device.InvokeOnMainThreadAsync(() =>
}
else
{
await _shell.CurrentItem.CurrentItem.GoToAsync(navigationRequest, queryData, animate, isRelativePopping);
// TODO get rid of this hack and fix so if there's a stack the current page doesn't display
await Device.InvokeOnMainThreadAsync(() =>
{
return _shell.CurrentItem.CurrentItem.GoToAsync(navigationRequest, queryData, animate, isRelativePopping);
});
}

(_shell as IShellController).UpdateCurrentState(source);
Expand Down