Refactor Search commands execute to methods
MODIFY
WalletWasabi.Fluent/ViewModels/Search/SearchItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Search/SearchItemViewModel.cs
+using System.Threading.Tasks;
using System.Windows.Input;
using ReactiveUI;
using WalletWasabi.Fluent.ViewModels.Navigation;
@@ -15,9 +16,10 @@ namespace WalletWasabi.Fluent.ViewModels.Search
{
_metaData = metaData;
Category = category;
+ OpenCommand = ReactiveCommand.CreateFromTask(async () => await OpenExecute(owner, metaData));
+ }
- OpenCommand = ReactiveCommand.CreateFromTask(
- async () =>
+ private async Task OpenExecute(SearchPageViewModel owner, NavigationMetaData metaData)
{
owner.IsBusy = true;
var view = await NavigationManager.MaterialiseViewModel(metaData);
@@ -28,7 +30,6 @@ namespace WalletWasabi.Fluent.ViewModels.Search
}
owner.IsBusy = false;
- });
}
public string Caption => _metaData.Caption;

Refactor Search commands execute to methods