remove unnessary code
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletAdvancedViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletAdvancedViewModel.cs
using ReactiveUI;
using System.Collections.ObjectModel;
-using System.Reactive;
-using System.Reactive.Linq;
-using WalletWasabi.Logging;
-using System;
-using System.IO;
using WalletWasabi.Gui.ViewModels;
using WalletWasabi.Wallets;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
- public class WalletAdvancedViewModel : WasabiDocumentTabViewModel
+ public class WalletAdvancedViewModel : ViewModelBase
{
private ObservableCollection<WasabiDocumentTabViewModel> _items;
-
private bool _isExpanded;
- public ReactiveCommand<Unit, bool> ExpandItCommand { get; }
+ public WalletAdvancedViewModel()
+ {
+ Items = new ObservableCollection<WasabiDocumentTabViewModel>();
+ }
public bool IsExpanded
{
@@ -24,17 +21,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
set => this.RaiseAndSetIfChanged(ref _isExpanded, value);
}
- public WalletAdvancedViewModel(Wallet wallet) : base(wallet.WalletName)
- {
- Items = new ObservableCollection<WasabiDocumentTabViewModel>();
-
- ExpandItCommand = ReactiveCommand.Create(() => IsExpanded = !IsExpanded);
-
- ExpandItCommand.ThrownExceptions
- .ObserveOn(RxApp.TaskpoolScheduler)
- .Subscribe(ex => Logger.LogError(ex));
- }
-
public ObservableCollection<WasabiDocumentTabViewModel> Items
{
get => _items;

MODIFY
WalletWasabi.Gui/ViewModels/WasabiDocumentTabViewModel.cs
WalletWasabi.Gui/ViewModels/WasabiDocumentTabViewModel.cs
@@ -27,11 +27,6 @@ namespace WalletWasabi.Gui.ViewModels
protected WasabiDocumentTabViewModel(string title)
{
Title = title;
- DoItCommand = ReactiveCommand.Create(DisplayActionTab);
-
- DoItCommand.ThrownExceptions
- .ObserveOn(RxApp.TaskpoolScheduler)
- .Subscribe(ex => Logger.LogError(ex));
}
private CompositeDisposable Disposables { get; set; }
@@ -110,13 +105,6 @@ namespace WalletWasabi.Gui.ViewModels
return true;
}
- public void DisplayActionTab()
- {
- IoC.Get<IShell>().AddOrSelectDocument(this);
- }
-
- public ReactiveCommand<Unit, Unit> DoItCommand { get; }
-
public void Select()
{
IoC.Get<IShell>().Select(this);
@@ -125,7 +113,6 @@ namespace WalletWasabi.Gui.ViewModels
public async Task<object> ShowDialogAsync()
{
DialogResult = null;
- DisplayActionTab();
while (!IsClosed)
{

remove unnessary code