T&Cs ViewModel is no longer a dialog... and is routable.
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/TermsAndConditionsViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/TermsAndConditionsViewModel.cs
@@ -7,7 +7,7 @@ using WalletWasabi.Legal;
namespace WalletWasabi.Fluent.ViewModels.AddWallet
{
- public class TermsAndConditionsViewModel : DialogViewModelBase<bool>
+ public class TermsAndConditionsViewModel : RoutableViewModel
{
private bool _isAgreed;
@@ -29,16 +29,9 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
NextCommand = ReactiveCommand.Create(
() =>
{
- Close(true);
NavigateTo(next, NavigationTarget.DialogScreen);
},
this.WhenAnyValue(x => x.IsAgreed));
-
- CancelCommand = ReactiveCommand.Create(() =>
- {
- Close();
- GoBack();
- });
}
public bool IsAgreed
@@ -48,9 +41,5 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
}
public ICommand ViewTermsCommand { get; }
-
- protected override void OnDialogClosed()
- {
- }
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/DialogViewModelBase.cs
WalletWasabi.Fluent/ViewModels/Dialogs/DialogViewModelBase.cs
@@ -16,8 +16,6 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
{
}
- public ICommand NextCommand { get; protected set; }
-
/// <summary>
/// Gets or sets if the dialog is opened/closed.
/// </summary>

MODIFY
WalletWasabi.Fluent/ViewModels/RoutableViewModel.cs
WalletWasabi.Fluent/ViewModels/RoutableViewModel.cs
@@ -33,6 +33,8 @@ namespace WalletWasabi.Fluent.ViewModels
public NavigationTarget NavigationTarget { get; }
+ public ICommand NextCommand { get; protected set; }
+
public ICommand BackCommand { get; protected set; }
public ICommand CancelCommand { get; protected set; }

T&Cs ViewModel is no longer a dialog... and is routable.