-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Android] Fixed flickering when navigating using GoToAsync #28159
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1035,6 +1035,7 @@ public Task GoToAsync(ShellNavigationState state) | |
| /// <include file="../../../docs/Microsoft.Maui.Controls/Shell.xml" path="//Member[@MemberName='GoToAsync'][2]/Docs/*" /> | ||
| public Task GoToAsync(ShellNavigationState state, bool animate) | ||
| { | ||
| IsAnimateOnNavigation = animate; | ||
| return _navigationManager.GoToAsync(state, animate, false); | ||
| } | ||
|
|
||
|
|
@@ -1054,6 +1055,7 @@ public Task GoToAsync(ShellNavigationState state, IDictionary<string, object> pa | |
| /// <returns>A task that represents the asynchronous navigation operation.</returns> | ||
| public Task GoToAsync(ShellNavigationState state, bool animate, IDictionary<string, object> parameters) | ||
| { | ||
| IsAnimateOnNavigation = animate; | ||
|
||
| return _navigationManager.GoToAsync(state, animate, false, parameters: new ShellRouteParameters(parameters)); | ||
| } | ||
|
|
||
|
|
@@ -1077,6 +1079,7 @@ public Task GoToAsync(ShellNavigationState state, ShellNavigationQueryParameters | |
| /// <returns></returns> | ||
| public Task GoToAsync(ShellNavigationState state, bool animate, ShellNavigationQueryParameters shellNavigationQueryParameters) | ||
| { | ||
| IsAnimateOnNavigation = animate; | ||
|
||
| return _navigationManager.GoToAsync(state, animate, false, parameters: new ShellRouteParameters(shellNavigationQueryParameters)); | ||
| } | ||
|
|
||
|
|
@@ -1178,6 +1181,7 @@ public Task GoToAsync(ShellNavigationState state, bool animate, ShellNavigationQ | |
| ShellNavigationManager _navigationManager; | ||
| ShellFlyoutItemsManager _flyoutManager; | ||
| Page _previousPage; | ||
| internal bool IsAnimateOnNavigation = true; | ||
|
|
||
| /// <include file="../../../docs/Microsoft.Maui.Controls/Shell.xml" path="//Member[@MemberName='.ctor']/Docs/*" /> | ||
| public Shell() | ||
|
|
||
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.
The assignment to IsAnimateOnNavigation is repeated across multiple GoToAsync overloads; consider refactoring this duplication into a common helper method or a centralized assignment to improve maintainability.