more idisposable stuff removed.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinJoinTabViewModel.cs
@@ -90,17 +90,17 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
PrivacySomeCommand = ReactiveCommand.Create(() =>
{
TargetPrivacy = TargetPrivacy.Some;
- }).DisposeWith(Disposables);
+ });
PrivacyFineCommand = ReactiveCommand.Create(() =>
{
TargetPrivacy = TargetPrivacy.Fine;
- }).DisposeWith(Disposables);
+ });
PrivacyStrongCommand = ReactiveCommand.Create(() =>
{
TargetPrivacy = TargetPrivacy.Strong;
- }).DisposeWith(Disposables);
+ });
TargetButtonCommand = ReactiveCommand.Create(async () =>
{
@@ -124,7 +124,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
Global.Config.MixUntilAnonymitySet = CoinJoinUntilAnonimitySet;
await Global.Config.ToFileAsync();
- }).DisposeWith(Disposables);
+ });
this.WhenAnyValue(x => x.Password).Subscribe(async x =>
{
@@ -144,7 +144,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
Logger.LogTrace(ex);
}
- }).DisposeWith(Disposables);
+ });
this.WhenAnyValue(x => x.IsEnqueueBusy).Subscribe(busy =>
{
@@ -156,7 +156,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
EnqueueButtonText = EnqueueButtonTextString;
}
- }).DisposeWith(Disposables);
+ });
this.WhenAnyValue(x => x.IsDequeueBusy).Subscribe(busy =>
{
@@ -168,12 +168,12 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
DequeueButtonText = DequeueButtonTextString;
}
- }).DisposeWith(Disposables);
+ });
this.WhenAnyValue(x => x.TargetPrivacy).Subscribe(target =>
{
CoinJoinUntilAnonimitySet = GetTargetLevel(target);
- }).DisposeWith(Disposables);
+ });
}
private async Task DoDequeueAsync(IEnumerable<CoinViewModel> selectedCoins)

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/HistoryTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/HistoryTabViewModel.cs
@@ -11,7 +11,7 @@ using WalletWasabi.Models;
namespace WalletWasabi.Gui.Controls.WalletExplorer
{
- public class HistoryTabViewModel : WalletActionViewModel, ISupportsActivation
+ public class HistoryTabViewModel : WalletActionViewModel
{
private ObservableCollection<TransactionViewModel> _transactions;
private TransactionViewModel _selectedTransaction;
@@ -24,6 +24,10 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public HistoryTabViewModel(WalletViewModel walletViewModel)
: base("History", walletViewModel)
{
+ throw new Exception("TODO");
+
+ // memory leak fixes.
+
Transactions = new ObservableCollection<TransactionViewModel>();
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
RewriteTableAsync();
@@ -43,7 +47,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
RewriteTableAsync();
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
- }).DisposeWith(Disposables);
+ });
this.WhenAnyValue(x => x.SelectedTransaction).Subscribe(transaction =>
{
@@ -51,9 +55,9 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
transaction?.CopyToClipboard();
}
- }).DisposeWith(Disposables);
+ });
- SortCommand = ReactiveCommand.Create(() => RefreshOrdering()).DisposeWith(Disposables);
+ SortCommand = ReactiveCommand.Create(() => RefreshOrdering());
DateSortDirection = SortOrder.Decreasing;
}
@@ -236,8 +240,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
}
- public ViewModelActivator Activator => throw new NotImplementedException();
-
private void RefreshOrdering()
{
if (TransactionSortDirection != SortOrder.None)

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabViewModel.cs
@@ -28,6 +28,8 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public ReceiveTabViewModel(WalletViewModel walletViewModel)
: base("Receive", walletViewModel)
{
+ throw new Exception("TODO");
+ // memory leak fixes.
_addresses = new ObservableCollection<AddressViewModel>();
Label = "";
@@ -36,7 +38,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
.Subscribe(o =>
{
InitializeAddresses();
- }).DisposeWith(Disposables);
+ });
InitializeAddresses();
@@ -76,9 +78,9 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Label = "";
});
- }).DisposeWith(Disposables);
+ });
- this.WhenAnyValue(x => x.Label).Subscribe(x => UpdateSuggestions(x)).DisposeWith(Disposables);
+ this.WhenAnyValue(x => x.Label).Subscribe(x => UpdateSuggestions(x));
this.WhenAnyValue(x => x.SelectedAddress).Subscribe(address =>
{
@@ -86,7 +88,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
address?.CopyToClipboard();
}
- }).DisposeWith(Disposables);
+ });
this.WhenAnyValue(x => x.CaretIndex).Subscribe(_ =>
{
@@ -95,7 +97,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
CaretIndex = Label.Length;
}
- }).DisposeWith(Disposables);
+ });
_suggestions = new ObservableCollection<SuggestionViewModel>();
}

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -70,6 +70,9 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public SendTabViewModel(WalletViewModel walletViewModel)
: base("Send", walletViewModel)
{
+ throw new Exception("TODO");
+
+ // TODO memory leak fixes.
Label = "";
AllSelectedAmount = Money.Zero;
UsdExchangeRate = Global.Synchronizer.UsdExchangeRate;
@@ -131,7 +134,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
SetFeesAndTexts();
- }).DisposeWith(Disposables);
+ });
BuildTransactionCommand = ReactiveCommand.Create(async () =>
{
@@ -225,12 +228,11 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
},
this.WhenAny(x => x.IsMax, x => x.Amount, x => x.Address, x => x.IsBusy,
- (isMax, amount, address, busy) => (isMax.Value || !string.IsNullOrWhiteSpace(amount.Value)) && !string.IsNullOrWhiteSpace(Address) && !IsBusy))
- .DisposeWith(Disposables);
+ (isMax, amount, address, busy) => (isMax.Value || !string.IsNullOrWhiteSpace(amount.Value)) && !string.IsNullOrWhiteSpace(Address) && !IsBusy));
- MaxCommand = ReactiveCommand.Create(SetMax).DisposeWith(Disposables);
+ MaxCommand = ReactiveCommand.Create(SetMax);
- FeeRateCommand = ReactiveCommand.Create(ChangeFeeRateDisplay).DisposeWith(Disposables);
+ FeeRateCommand = ReactiveCommand.Create(ChangeFeeRateDisplay);
this.WhenAnyValue(x => x.IsBusy).Subscribe(busy =>
{
@@ -242,7 +244,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
BuildTransactionButtonText = BuildTransactionButtonTextString;
}
- }).DisposeWith(Disposables);
+ });
this.WhenAnyValue(x => x.Password).Subscribe(x =>
{
@@ -261,9 +263,9 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
Logging.Logger.LogTrace(ex);
}
- }).DisposeWith(Disposables);
+ });
- this.WhenAnyValue(x => x.Label).Subscribe(x => UpdateSuggestions(x)).DisposeWith(Disposables);
+ this.WhenAnyValue(x => x.Label).Subscribe(x => UpdateSuggestions(x));
this.WhenAnyValue(x => x.CaretIndex).Subscribe(_ =>
{
@@ -272,13 +274,14 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
CaretIndex = Label.Length;
}
- }).DisposeWith(Disposables);
+ });
this.WhenAnyValue(x => x.FeeTarget).Subscribe(_ =>
{
SetFeesAndTexts();
- }).DisposeWith(Disposables);
+ });
+ // TODO this can be observable... and do we own coinlist, if so it will be collected?
CoinList.SelectionChanged += CoinList_SelectionChanged;
_suggestions = new ObservableCollection<SuggestionViewModel>();

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
@@ -29,7 +29,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
ClearSensitiveData(true);
_warningMessage = "";
- Closing = new CancellationTokenSource().DisposeWith(Disposables);
+ Closing = new CancellationTokenSource();
this.WhenAnyValue(x => x.Password).Subscribe(x =>
{
@@ -48,7 +48,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
Logging.Logger.LogTrace(ex);
}
- }).DisposeWith(Disposables);
+ });
ShowSensitiveKeysCommand = ReactiveCommand.Create(() =>
{
@@ -68,7 +68,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
SetWarningMessage(ex.ToTypeMessageString());
}
- }).DisposeWith(Disposables);
+ });
}
private void ClearSensitiveData(bool passwordToo)

more idisposable stuff removed.