1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-17 08:43:21 +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

@@ -22,8 +22,8 @@ namespace Bit.App.Pages
private bool _avoidAmbiguous;
private int _minNumber;
private int _minSpecial;
private int _length;
private int _numWords;
private int _length = 5;
private int _numWords = 3;
private string _wordSeparator;
private int _typeSelectedIndex;
private bool _doneIniting;
@@ -173,9 +173,10 @@ namespace Bit.App.Pages
get => _wordSeparator;
set
{
if(SetProperty(ref _wordSeparator, value))
var val = value.Trim();
if(SetProperty(ref _wordSeparator, val))
{
_options.WordSeparator = value;
_options.WordSeparator = val;
var task = SaveOptionsAsync();
}
}
@@ -244,6 +245,7 @@ namespace Bit.App.Pages
WordSeparator = _options.WordSeparator;
Uppercase = _options.Uppercase.GetValueOrDefault();
Lowercase = _options.Lowercase.GetValueOrDefault();
Length = _options.Length.GetValueOrDefault(5);
}
private void SetOptions()
@@ -258,6 +260,7 @@ namespace Bit.App.Pages
_options.WordSeparator = WordSeparator;
_options.Uppercase = Uppercase;
_options.Lowercase = Lowercase;
_options.Length = Length;
}
}
}