1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 23:03:23 +00:00

vault groupings page list view stubbed

This commit is contained in:
Kyle Spearrin
2019-03-29 12:52:57 -04:00
parent d84eece715
commit 69ac98b2f6
9 changed files with 278 additions and 43 deletions

View File

@@ -1,38 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using Bit.Core.Utilities;
namespace Bit.App.Pages
{
public abstract class BaseViewModel : INotifyPropertyChanged
public abstract class BaseViewModel : ExtendedViewModel
{
private string _pageTitle = string.Empty;
public event PropertyChangedEventHandler PropertyChanged;
public string PageTitle
{
get => _pageTitle;
set => SetProperty(ref _pageTitle, value);
}
protected bool SetProperty<T>(ref T backingStore, T value, [CallerMemberName]string propertyName = "",
Action onChanged = null)
{
if(EqualityComparer<T>.Default.Equals(backingStore, value))
{
return false;
}
backingStore = value;
onChanged?.Invoke();
OnPropertyChanged(propertyName);
return true;
}
protected void OnPropertyChanged([CallerMemberName] string propertyName = "")
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}