close dialogs if they have been navigated to.
MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/DialogScreenViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/DialogScreenViewModel.cs
@@ -49,6 +49,11 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
_isClosing = true;
if (Router.NavigationStack.Count >= 1)
{
+ if (Router.GetCurrentViewModel() is DialogViewModelBase vmb)
+ {
+ vmb.Close();
+ }
+
Router.NavigationStack.Clear();
}
_isClosing = false;

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/DialogViewModelBase.cs
WalletWasabi.Fluent/ViewModels/Dialogs/DialogViewModelBase.cs
@@ -13,9 +13,10 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
public DialogViewModelBase(NavigationStateViewModel navigationState, NavigationTarget navigationTarget) : base(navigationState, navigationTarget)
{
-
}
+ public abstract void Close();
+
public ICommand NextCommand { get; protected set; }
/// <summary>

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/DialogViewModelBaseOfTResult.cs
WalletWasabi.Fluent/ViewModels/Dialogs/DialogViewModelBaseOfTResult.cs
@@ -58,6 +58,11 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
OnDialogClosed();
}
+ public override void Close()
+ {
+ Close(default(TResult));
+ }
+
/// <summary>
/// Shows the dialog.
/// </summary>

close dialogs if they have been navigated to.