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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user