-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Android] Navigation icon blink fix - shell (#18867) #21455
Conversation
Any idea when this will be approved? Such a frustrating bug! |
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -77,6 +77,9 @@ public static void UpdateTitleIcon(this AToolbar nativeToolbar, Toolbar toolbar) | |||
|
|||
public static void UpdateBackButton(this AToolbar nativeToolbar, Toolbar toolbar) | |||
{ | |||
//Setting it to null to avoid the icon's blink | |||
nativeToolbar.NavigationIcon = null; |
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.
Interesting, do we know by chance where this is getting set upstream? I'm curious if we can fix this by not setting this upstream somewhere.
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.
I tried to look for it, but couldn't find a better solution
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.
So, I think what's happening here is that the mapper code is firing too early
It looks like this is the path causing the Drawer to show up
ToolbarItems being set is causing the NavBar to re-evaluate before the properties on backbutton and those have updated.
It's a bit tricky because you want the toolbar itself to update atomically before propagating. I'm not too sure the best way to handle this.
The ToolbarItems are stored as a private variable, so in some cases what I've done is just set the private value and then fire the propertychanged after everything is set
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Please merge, such an annoying bug @PureWeen |
@PureWeen What must be true to get this resolved? This is something that is plaguing our production app as well. |
/rebase |
5778124
to
d1fb001
Compare
@@ -77,6 +77,9 @@ public static void UpdateTitleIcon(this AToolbar nativeToolbar, Toolbar toolbar) | |||
|
|||
public static void UpdateBackButton(this AToolbar nativeToolbar, Toolbar toolbar) | |||
{ | |||
//Setting it to null to avoid the icon's blink | |||
nativeToolbar.NavigationIcon = null; |
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.
So, I think what's happening here is that the mapper code is firing too early
It looks like this is the path causing the Drawer to show up
ToolbarItems being set is causing the NavBar to re-evaluate before the properties on backbutton and those have updated.
It's a bit tricky because you want the toolbar itself to update atomically before propagating. I'm not too sure the best way to handle this.
The ToolbarItems are stored as a private variable, so in some cases what I've done is just set the private value and then fire the propertychanged after everything is set
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
|
Issues Fixed
Fixes #18867
Fixes #22649