mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
fixes for custom field name prompt
This commit is contained in:
parent
a0e65fa75e
commit
b07afa7f11
1 changed files with 14 additions and 3 deletions
|
@ -424,12 +424,20 @@ namespace Bit.App.Pages
|
||||||
if(typeSelection != null && typeSelection != AppResources.Cancel)
|
if(typeSelection != null && typeSelection != AppResources.Cancel)
|
||||||
{
|
{
|
||||||
var name = await _deviceActionService.DisplayPromptAync(AppResources.CustomFieldName);
|
var name = await _deviceActionService.DisplayPromptAync(AppResources.CustomFieldName);
|
||||||
|
if(name == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(Fields == null)
|
if(Fields == null)
|
||||||
{
|
{
|
||||||
Fields = new ExtendedObservableCollection<AddEditPageFieldViewModel>();
|
Fields = new ExtendedObservableCollection<AddEditPageFieldViewModel>();
|
||||||
}
|
}
|
||||||
var type = _fieldTypeOptions.FirstOrDefault(f => f.Value == typeSelection).Key;
|
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,9 +555,12 @@ namespace Bit.App.Pages
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
SetProperty(ref _booleanValue, value);
|
SetProperty(ref _booleanValue, value);
|
||||||
|
if(IsBooleanType)
|
||||||
|
{
|
||||||
Field.Value = value ? "true" : "false";
|
Field.Value = value ? "true" : "false";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Command ToggleHiddenValueCommand { get; set; }
|
public Command ToggleHiddenValueCommand { get; set; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue