1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-20 10:13:42 +00:00

cipher view cell control

This commit is contained in:
Kyle Spearrin
2019-03-29 16:52:57 -04:00
parent 53974c4464
commit a1c853d7fc
6 changed files with 118 additions and 58 deletions

View File

@@ -9,8 +9,8 @@ namespace Bit.Core.Utilities
{
public event PropertyChangedEventHandler PropertyChanged;
protected bool SetProperty<T>(ref T backingStore, T value, [CallerMemberName]string propertyName = "",
Action onChanged = null)
protected bool SetProperty<T>(ref T backingStore, T value, Action onChanged = null,
[CallerMemberName]string propertyName = "")
{
if(EqualityComparer<T>.Default.Equals(backingStore, value))
{
@@ -18,14 +18,9 @@ namespace Bit.Core.Utilities
}
backingStore = value;
onChanged?.Invoke();
OnPropertyChanged(propertyName);
return true;
}
protected void OnPropertyChanged([CallerMemberName] string propertyName = "")
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
onChanged?.Invoke();
return true;
}
}
}