only select when there is an action passed in

This commit is contained in:
Kyle Spearrin 2016-07-07 00:35:39 -04:00
parent 6b996e3a98
commit e7c78f6efa

View file

@ -104,14 +104,16 @@ namespace Bit.App.Pages
VerticalOptions = LayoutOptions.FillAndExpand VerticalOptions = LayoutOptions.FillAndExpand
}; };
if(_passwordValueAction != null)
{
var selectToolBarItem = new ToolbarItem("Select", null, async () => var selectToolBarItem = new ToolbarItem("Select", null, async () =>
{ {
_passwordValueAction(Password.Text); _passwordValueAction(Password.Text);
await Navigation.PopModalAsync(); await Navigation.PopModalAsync();
}, ToolbarItemOrder.Default, 0); }, ToolbarItemOrder.Default, 0);
ToolbarItems.Add(selectToolBarItem); ToolbarItems.Add(selectToolBarItem);
}
Title = "Generate Password"; Title = "Generate Password";
Content = scrollView; Content = scrollView;