Handle navigation restriction in caller
MODIFY
WalletWasabi.Fluent/Helpers/NotificationHelpers.cs
WalletWasabi.Fluent/Helpers/NotificationHelpers.cs
@@ -33,25 +33,10 @@ public static class NotificationHelpers
{
if (NotificationManager is { } nm)
{
- RxApp.MainThreadScheduler.Schedule(() => nm.Show(new Notification(title, message, NotificationType.Information, TimeSpan.FromSeconds(DefaultNotificationTimeout), () => TryExecute(onClick))));
+ RxApp.MainThreadScheduler.Schedule(() => nm.Show(new Notification(title, message, NotificationType.Information, TimeSpan.FromSeconds(DefaultNotificationTimeout), onClick)));
}
}
- private static void TryExecute(Action? action)
- {
- if (action is null)
- {
- return;
- }
-
- if (MainViewModel.Instance.IsBusy)
- {
- return;
- }
-
- action();
- }
-
public static void Show(string walletName, ProcessedResult result, Action onClick)
{
if (TryGetNotificationInputs(result, out var message))

MODIFY
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
@@ -107,7 +107,15 @@ public partial class WalletManagerViewModel : ViewModelBase
{
if (!e.IsOwnCoinJoin)
{
- NotificationHelpers.Show(wallet.WalletName, e, onClick: () => wvm.NavigateAndHighlight(e.Transaction.GetHash()));
+ NotificationHelpers.Show(wallet.WalletName, e, onClick: () =>
+ {
+ if (MainViewModel.Instance.IsBusy)
+ {
+ return;
+ }
+
+ wvm.NavigateAndHighlight(e.Transaction.GetHash());
+ });
}
if (wvm.IsSelected && (e.NewlyReceivedCoins.Any() || e.NewlyConfirmedReceivedCoins.Any()))

Handle navigation restriction in caller