From e7c78f6efaeac8fa8093a969d1e769df7fa0313c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 7 Jul 2016 00:35:39 -0400 Subject: [PATCH] only select when there is an action passed in --- src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs b/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs index d4b950a29..c761e9ee3 100644 --- a/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs +++ b/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs @@ -104,14 +104,16 @@ namespace Bit.App.Pages VerticalOptions = LayoutOptions.FillAndExpand }; - var selectToolBarItem = new ToolbarItem("Select", null, async () => + if(_passwordValueAction != null) { - _passwordValueAction(Password.Text); - await Navigation.PopModalAsync(); - }, ToolbarItemOrder.Default, 0); + var selectToolBarItem = new ToolbarItem("Select", null, async () => + { + _passwordValueAction(Password.Text); + await Navigation.PopModalAsync(); + }, ToolbarItemOrder.Default, 0); - - ToolbarItems.Add(selectToolBarItem); + ToolbarItems.Add(selectToolBarItem); + } Title = "Generate Password"; Content = scrollView;