Navigate back to home screen and reset navigation stack
MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/TestDialogViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/TestDialogViewModel.cs
@@ -5,10 +5,12 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
{
public class TestDialogViewModel : DialogViewModelBase<bool>
{
+ private IScreen _screen;
private string _message;
- public TestDialogViewModel(string message)
+ public TestDialogViewModel(IScreen screen, string message)
{
+ _screen = screen;
_message = message;
CancelCommand = ReactiveCommand.Create(() => Close(false));
@@ -26,6 +28,7 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
protected override void OnDialogClosed()
{
+ _screen.Router.NavigateAndReset.Execute(new HomePageViewModel(_screen));
}
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
@@ -4,6 +4,7 @@ using System.Windows.Input;
using WalletWasabi.Fluent.ViewModels.Dialogs;
using WalletWasabi.Gui.Validation;
using WalletWasabi.Models;
+
namespace WalletWasabi.Fluent.ViewModels
{
public class SettingsPageViewModel : NavBarItemViewModel
@@ -23,7 +24,7 @@ namespace WalletWasabi.Fluent.ViewModels
ConfirmSetting.RegisterHandler(
async interaction =>
{
- var x = new TestDialogViewModel(interaction.Input);
+ var x = new TestDialogViewModel(screen, interaction.Input);
var result = await x.ShowDialogAsync(MainViewModel.Instance);
interaction.SetOutput(result);
});

Navigate back to home screen and reset navigation stack