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