1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-14 23:33:34 +00:00

pass gen fixes

This commit is contained in:
Kyle Spearrin
2019-05-13 16:06:56 -04:00
parent 99f00b8e63
commit 9400c22e4f
4 changed files with 41 additions and 13 deletions

View File

@@ -5,12 +5,22 @@ namespace Bit.App.Pages
public partial class GeneratorPage : BaseContentPage
{
private GeneratorPageViewModel _vm;
private readonly Action<string> _selectAction;
public GeneratorPage()
: this(null)
{ }
public GeneratorPage(Action<string> selectAction)
{
InitializeComponent();
_vm = BindingContext as GeneratorPageViewModel;
_vm.Page = this;
_selectAction = selectAction;
if(selectAction == null)
{
ToolbarItems.Remove(_selectItem);
}
}
protected async override void OnAppearing()
@@ -31,7 +41,7 @@ namespace Bit.App.Pages
private void Select_Clicked(object sender, EventArgs e)
{
_selectAction?.Invoke(_vm.Password);
}
private void History_Clicked(object sender, EventArgs e)