dispose the subscription after closing
MODIFY
WalletWasabi.Fluent/ViewModels/Dialog/DialogViewModelBaseOfTResult.cs
WalletWasabi.Fluent/ViewModels/Dialog/DialogViewModelBaseOfTResult.cs
@@ -11,9 +11,11 @@ namespace WalletWasabi.Fluent.ViewModels.Dialog
/// <typeparam name="TResult">The type of the value to be returned when the dialog is finished.</typeparam>
public abstract class DialogViewModelBase<TResult> : DialogViewModelBase
{
+ private IDisposable _disposable;
+
protected DialogViewModelBase()
{
- this.WhenAnyValue(x => x.IsDialogOpen)
+ this._disposable = this.WhenAnyValue(x => x.IsDialogOpen)
.DistinctUntilChanged()
.Subscribe(OnIsDialogOpenChanged);
}
@@ -50,6 +52,7 @@ namespace WalletWasabi.Fluent.ViewModels.Dialog
}
IsDialogOpen = false;
+ _disposable?.Dispose();
OnDialogClosed();
}

dispose the subscription after closing