Reorder params for SearchItemViewModel ctor
MODIFY
WalletWasabi.Fluent/ViewModels/Search/SearchItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Search/SearchItemViewModel.cs
@@ -7,28 +7,22 @@ namespace WalletWasabi.Fluent.ViewModels.Search
public class SearchItemViewModel : RoutableViewModel
{
public SearchItemViewModel(
- NavigationStateViewModel navigationState,
- NavigationTarget navigationTarget,
- string iconName,
string title,
string caption,
int order,
SearchCategory category,
string keywords,
+ string iconName,
+ NavigationStateViewModel navigationState,
+ NavigationTarget navigationTarget,
Func<RoutableViewModel> createTargetView) : base(navigationState, navigationTarget)
{
IconName = iconName;
-
Title = title;
-
Caption = caption;
-
Order = order;
-
Category = category;
-
Keywords = keywords;
-
OpenCommand = ReactiveCommand.Create(() => NavigateTo(createTargetView(), navigationTarget));
}

MODIFY
WalletWasabi.Fluent/ViewModels/SearchPageViewModel.cs
WalletWasabi.Fluent/ViewModels/SearchPageViewModel.cs
@@ -78,57 +78,57 @@ namespace WalletWasabi.Fluent.ViewModels
private SearchItemViewModel CreateHomeSearchItem(SearchCategory category, int order, WalletManagerViewModel walletManager, AddWalletPageViewModel addWalletPage)
{
return new(
- NavigationState,
- NavigationTarget.HomeScreen,
- iconName: "home_regular",
title: "Home",
caption: "Manage existing wallets",
order: order,
category: category,
keywords: "Home",
- () => new HomePageViewModel(NavigationState, walletManager, addWalletPage));
+ iconName: "home_regular",
+ navigationState: NavigationState,
+ navigationTarget: NavigationTarget.HomeScreen,
+ createTargetView: () => new HomePageViewModel(NavigationState, walletManager, addWalletPage));
}
private SearchItemViewModel CreateSettingsSearchItem(SearchCategory category, int order)
{
return new(
- NavigationState,
- NavigationTarget.HomeScreen,
- iconName: "settings_regular",
title: "Settings",
caption: "Manage appearance, privacy and other settings",
order: order,
category: category,
keywords: "Settings, General, User Interface, Privacy, Advanced",
- () => new SettingsPageViewModel(NavigationState));
+ iconName: "settings_regular",
+ navigationState: NavigationState,
+ navigationTarget: NavigationTarget.HomeScreen,
+ createTargetView: () => new SettingsPageViewModel(NavigationState));
}
private SearchItemViewModel CreateAddWalletSearchItem(SearchCategory category, int order, AddWalletPageViewModel addWalletPage)
{
return new(
- NavigationState,
- NavigationTarget.DialogScreen,
- iconName: "add_circle_regular",
title: "Add Wallet",
caption: "Create, recover or import wallet",
order: order,
category: category,
keywords: "Wallet, Add Wallet, Create Wallet, Recover Wallet, Import Wallet, Connect Hardware Wallet",
- () => addWalletPage);
+ iconName: "add_circle_regular",
+ navigationState: NavigationState,
+ navigationTarget: NavigationTarget.DialogScreen,
+ createTargetView: () => addWalletPage);
}
private SearchItemViewModel CreateWalletSearchItem(SearchCategory category, int order, WalletViewModelBase wallet)
{
return new(
- NavigationState,
- NavigationTarget.HomeScreen,
- iconName: "web_asset_regular",
title: wallet.WalletName,
caption: "Wallet",
order: order,
category: category,
keywords: $"Wallet, {wallet.WalletName}",
- () => wallet);
+ iconName: "web_asset_regular",
+ navigationState: NavigationState,
+ navigationTarget: NavigationTarget.HomeScreen,
+ createTargetView: () => wallet);
}
}
}
\ No newline at end of file

Reorder params for SearchItemViewModel ctor