Skip to content

Commit 6950839

Browse files
authored
Minor cold clean up to avoid unnecessary code execution
1 parent 4c53c05 commit 6950839

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Renderers/CustomNavigationPageRenderer.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ protected override void OnLayout(bool changed, int l, int t, int r, int b)
1212
{
1313
base.OnLayout(changed, l, t, r, b);
1414

15+
if (Element.CurrentPage == null)
16+
{
17+
return;
18+
}
19+
1520
var toolbar = FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
1621

1722
if (toolbar != null)
1823
{
1924
var image = toolbar.FindViewById<ImageView>(Resource.Id.toolbar_image);
2025

21-
if (Element.CurrentPage == null)
22-
{
23-
return;
24-
}
25-
2626
if (!string.IsNullOrEmpty(Element.CurrentPage.Title))
2727
image.Visibility = Android.Views.ViewStates.Invisible;
2828
else
2929
image.Visibility = Android.Views.ViewStates.Visible;
3030
}
3131
}
3232
}
33-
}
33+
}

0 commit comments

Comments
 (0)