remove navigation hack from `TriggerCommandViewModel`
MODIFY
WalletWasabi.Fluent/ViewModels/SearchBar/Sources/ActionsSource.cs
WalletWasabi.Fluent/ViewModels/SearchBar/Sources/ActionsSource.cs
@@ -46,6 +46,10 @@ public class ActionsSource : ISearchItemSource
{
item.OpenCommand.Execute(default);
}
+ else if (vm is TriggerCommandViewModel triggerCommandViewModel && triggerCommandViewModel.TargetCommand.CanExecute(default))
+ {
+ triggerCommandViewModel.TargetCommand.Execute(default);
+ }
else
{
RoutableViewModel.Navigate(vm.DefaultTarget).To(vm);

MODIFY
WalletWasabi.Fluent/ViewModels/TriggerCommandViewModel.cs
WalletWasabi.Fluent/ViewModels/TriggerCommandViewModel.cs
-using System.Reactive.Disposables;
using System.Windows.Input;
using WalletWasabi.Fluent.ViewModels.Navigation;
@@ -7,14 +6,4 @@ namespace WalletWasabi.Fluent.ViewModels;
public abstract class TriggerCommandViewModel : RoutableViewModel
{
public abstract ICommand TargetCommand { get; }
-
- protected override void OnNavigatedTo(bool isInHistory, CompositeDisposable disposables)
- {
- if (TargetCommand.CanExecute(null))
- {
- TargetCommand.Execute(null);
- }
- Navigate().Back();
- base.OnNavigatedTo(isInHistory, disposables);
- }
}

remove navigation hack from `TriggerCommandViewModel`