Skip to content

Commit

Permalink
Revert "chore: revert main command icon work"
Browse files Browse the repository at this point in the history
This reverts commit ac55ce3.
  • Loading branch information
kazo0 committed Feb 15, 2024
1 parent ac55ce3 commit d9cb72f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,7 @@ protected override void Render()
backItem.BackButtonTitle = mainCommand.Content as string ?? mainCommand.Label;
}

var mainCommandIcon = mainCommand.Icon is BitmapIcon bitmapIcon
? ImageHelper.FromUri(bitmapIcon.UriSource)?.ImageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
: null;

if (mainCommandIcon is { } icon && string.IsNullOrEmpty(_backItem?.BackButtonTitle))
if (mainCommand.Icon is { } icon && string.IsNullOrEmpty(_backItem?.BackButtonTitle))
{
native.LeftBarButtonItem = mainCommand.GetOrAddDefaultRenderer().Native;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void NavBar_Can_Close_From_First_Page()
App.WaitForElementWithMessage("M3Page1NavBar");

PlatformHelpers.On(
iOS: () => App.FastTap("CloseIcon"),
iOS: () => App.FastTap("M3_NavBar_Close_Button"),
Android: () => App.FastTap(q => q.Marked("M3Page1NavBar").Descendant("AppCompatImageButton"))
);
;
Expand Down

0 comments on commit d9cb72f

Please sign in to comment.