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

Support for Disable Send policy (#1271)

* add support for disable send policy

* cleanup

* show/hide options support for send search results

* additional failsafes and copy function consolidation

* added missing disabled send icon to android renderer

* async fix and string updates
This commit is contained in:
Matt Portune
2021-02-18 16:58:20 -05:00
committed by GitHub
parent 20d5c6a63a
commit 3799eb4603
18 changed files with 235 additions and 42 deletions

View File

@@ -15,6 +15,9 @@ namespace Bit.App.Controls
public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create(
nameof(ButtonCommand), typeof(Command<SendView>), typeof(SendViewCell));
public static readonly BindableProperty ShowOptionsProperty = BindableProperty.Create(
nameof(ShowOptions), typeof(bool), typeof(SendViewCell));
private readonly IEnvironmentService _environmentService;
@@ -47,6 +50,12 @@ namespace Bit.App.Controls
set => SetValue(ButtonCommandProperty, value);
}
public bool ShowOptions
{
get => GetValue(ShowOptionsProperty) is bool && (bool)GetValue(ShowOptionsProperty);
set => SetValue(ShowOptionsProperty, value);
}
protected override void OnPropertyChanged(string propertyName = null)
{
base.OnPropertyChanged(propertyName);
@@ -58,6 +67,10 @@ namespace Bit.App.Controls
{
_viewModel.Send = Send;
}
else if (propertyName == ShowOptionsProperty.PropertyName)
{
_viewModel.ShowOptions = ShowOptions;
}
}
protected override void OnBindingContextChanged()