add missing setups
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/AddWalletPageViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/AddWalletPageViewModel.cs
@@ -44,6 +44,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
var walletManager = walletManagerViewModel.WalletManager;
var network = walletManager.Network;
+ SetupCancel(enableCancel: true, enableCancelOnEscape: true, enableCancelOnPressed: true);
var enableBack = default(IDisposable);
this.WhenAnyValue(x => x.CurrentTarget)
@@ -172,9 +173,6 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
{
base.OnNavigatedTo(isInHistory, disposables);
- var enableCancel = CurrentTarget != NavigationTarget.HomeScreen;
- SetupCancel(enableCancel: enableCancel, enableCancelOnEscape: enableCancel, enableCancelOnPressed: enableCancel);
-
this.RaisePropertyChanged(WalletName);
if (!isInHistory)

MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/TermsAndConditionsViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/TermsAndConditionsViewModel.cs
@@ -18,6 +18,8 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
OnNext,
this.WhenAnyValue(x => x.IsAgreed)
.ObserveOn(RxApp.MainThreadScheduler));
+
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
}
public ICommand ViewTermsCommand { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/ConfirmHideAddressViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/ConfirmHideAddressViewModel.cs
@@ -15,6 +15,8 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
NextCommand = ReactiveCommand.Create(() => Close(result: true));
CancelCommand = ReactiveCommand.Create(() => Close(DialogResultKind.Cancel));
+
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
}
public string Label { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/InsufficientBalanceDialogViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/InsufficientBalanceDialogViewModel.cs
@@ -37,6 +37,8 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
NextCommand = ReactiveCommand.Create(() => Close(result: true));
CancelCommand = ReactiveCommand.Create(() => Close(DialogResultKind.Cancel));
+
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
}
public string AmountText { get; set; }

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/ShowErrorDialogViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/ShowErrorDialogViewModel.cs
@@ -14,6 +14,8 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
Caption = caption;
NextCommand = ReactiveCommand.Create(() => Close());
+
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
}
public string Message { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/HelpAndSupport/AboutViewModel.cs
WalletWasabi.Fluent/ViewModels/HelpAndSupport/AboutViewModel.cs
@@ -40,6 +40,8 @@ namespace WalletWasabi.Fluent.ViewModels.HelpAndSupport
await Application.Current.Clipboard.SetTextAsync(link));
NextCommand = CancelCommand;
+
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
}
public ICommand AboutAdvancedInfoDialogCommand { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/Login/PasswordFinder/PasswordNotFoundViewModel.cs
WalletWasabi.Fluent/ViewModels/Login/PasswordFinder/PasswordNotFoundViewModel.cs
@@ -10,6 +10,8 @@ namespace WalletWasabi.Fluent.ViewModels.Login.PasswordFinder
public PasswordNotFoundViewModel(Wallet wallet)
{
NextCommand = ReactiveCommand.Create(() => OnNext(wallet));
+
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
}
private void OnNext(Wallet wallet)

MODIFY
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/SuccessBroadcastTransactionViewModel.cs
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/SuccessBroadcastTransactionViewModel.cs
@@ -9,6 +9,8 @@ namespace WalletWasabi.Fluent.ViewModels.TransactionBroadcasting
public SuccessBroadcastTransactionViewModel()
{
NextCommand = ReactiveCommand.Create(() => Navigate().Clear());
+
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
}
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
@@ -40,6 +40,8 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
NextCommand = ReactiveCommand.Create(OnNext);
CopyTransactionIdCommand = ReactiveCommand.CreateFromTask(OnCopyTransactionId);
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
+
UpdateValues(transactionSummary);
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/OptimisePrivacyViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/OptimisePrivacyViewModel.cs
@@ -41,6 +41,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
_privacySuggestions = new ObservableCollection<PrivacySuggestionControlViewModel>();
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: false);
EnableBack = true;
NextCommand = ReactiveCommand.Create(

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
@@ -62,6 +62,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
StillNeeded = transactionInfo.Amount.ToDecimal(MoneyUnit.BTC);
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: false);
EnableBack = true;
NextCommand = ReactiveCommand.CreateFromTask(

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendSuccessViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendSuccessViewModel.cs
@@ -9,6 +9,8 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
public SendSuccessViewModel()
{
NextCommand = ReactiveCommand.Create(OnNext);
+
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
}
private void OnNext()

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -123,6 +123,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
Labels.ToObservableChangeSet().Subscribe(x => _transactionInfo.UserLabels = new SmartLabel(_labels.ToArray()));
+ SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: false);
EnableBack = true;
PasteCommand = ReactiveCommand.CreateFromTask(async () => await OnPaste());

add missing setups