Call base from child constructors, remove contructor from abstract class
MODIFY
WalletWasabi.Gui/Controls/LockScreen/LockScreenViewModelBase.cs
WalletWasabi.Gui/Controls/LockScreen/LockScreenViewModelBase.cs
@@ -9,18 +9,11 @@ namespace WalletWasabi.Gui.Controls.LockScreen
public abstract class LockScreenViewModelBase : ViewModelBase
{
private bool _isAnimating;
- private bool _isLocked;
+ private bool _isLocked = true;
private bool _canSlide;
private volatile bool _disposedValue = false; // To detect redundant calls
- public LockScreenViewModelBase()
- {
- Disposables = new CompositeDisposable();
-
- IsLocked = true;
- }
-
- protected CompositeDisposable Disposables { get; }
+ protected CompositeDisposable Disposables { get; } = new CompositeDisposable();
public bool CanSlide
{

MODIFY
WalletWasabi.Gui/Controls/LockScreen/PinLockScreenViewModel.cs
WalletWasabi.Gui/Controls/LockScreen/PinLockScreenViewModel.cs
@@ -13,7 +13,7 @@ namespace WalletWasabi.Gui.Controls.LockScreen
{
private string _pinInput;
- public PinLockScreenViewModel()
+ public PinLockScreenViewModel() : base()
{
KeyPadCommand = ReactiveCommand.Create<string>((arg) =>
{

MODIFY
WalletWasabi.Gui/Controls/LockScreen/SlideLockScreenViewModel.cs
WalletWasabi.Gui/Controls/LockScreen/SlideLockScreenViewModel.cs
@@ -8,7 +8,7 @@ namespace WalletWasabi.Gui.Controls.LockScreen
{
public readonly double ThresholdPercent = 1 / 6d;
- public SlideLockScreenViewModel()
+ public SlideLockScreenViewModel() : base()
{
CanSlide = true;

MODIFY
WalletWasabi.Gui/Tabs/LegalDocumentsViewModel.cs
WalletWasabi.Gui/Tabs/LegalDocumentsViewModel.cs
@@ -21,7 +21,7 @@ namespace WalletWasabi.Gui.Tabs
private string _text;
private bool _emptyContent;
- public LegalDocumentsViewModel(string content = null, LegalDocuments legalDoc = null)
+ public LegalDocumentsViewModel(string content = null, LegalDocuments legalDoc = null) : base()
{
FilePath = legalDoc?.FilePath;
Content = content;

Call base from child constructors, remove contructor from abstract class