mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-15 10:25:20 +01:00
fixes for custom field name prompt
This commit is contained in:
parent
a0e65fa75e
commit
b07afa7f11
@ -424,12 +424,20 @@ namespace Bit.App.Pages
|
||||
if(typeSelection != null && typeSelection != AppResources.Cancel)
|
||||
{
|
||||
var name = await _deviceActionService.DisplayPromptAync(AppResources.CustomFieldName);
|
||||
if(name == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(Fields == null)
|
||||
{
|
||||
Fields = new ExtendedObservableCollection<AddEditPageFieldViewModel>();
|
||||
}
|
||||
var type = _fieldTypeOptions.FirstOrDefault(f => f.Value == typeSelection).Key;
|
||||
Fields.Add(new AddEditPageFieldViewModel(new FieldView { Type = type, Name = name }));
|
||||
Fields.Add(new AddEditPageFieldViewModel(new FieldView
|
||||
{
|
||||
Type = type,
|
||||
Name = string.IsNullOrWhiteSpace(name) ? null : name
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@ -547,7 +555,10 @@ namespace Bit.App.Pages
|
||||
set
|
||||
{
|
||||
SetProperty(ref _booleanValue, value);
|
||||
Field.Value = value ? "true" : "false";
|
||||
if(IsBooleanType)
|
||||
{
|
||||
Field.Value = value ? "true" : "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user