Merge pull request #200 from ahmedalejo/patch-1
Minor cold clean up to avoid unnecessary code execution
This commit is contained in:
commit
2861898e6e
@ -12,17 +12,17 @@ namespace eShopOnContainers.Droid.Renderers
|
||||
{
|
||||
base.OnLayout(changed, l, t, r, b);
|
||||
|
||||
if (Element.CurrentPage == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var toolbar = FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
|
||||
|
||||
if (toolbar != null)
|
||||
{
|
||||
var image = toolbar.FindViewById<ImageView>(Resource.Id.toolbar_image);
|
||||
|
||||
if (Element.CurrentPage == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Element.CurrentPage.Title))
|
||||
image.Visibility = Android.Views.ViewStates.Invisible;
|
||||
else
|
||||
@ -30,4 +30,4 @@ namespace eShopOnContainers.Droid.Renderers
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user