fix keyword search.
MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -62,7 +62,7 @@ namespace WalletWasabi.Fluent.ViewModels
var settingsPage = new SettingsPageViewModel(global.Config, global.UiConfig);
var privacyMode = new PrivacyModeViewModel(global.UiConfig);
var homePage = new HomePageViewModel(walletManager, addWalletPage);
- var searchPage = new SearchPageViewModel(walletManager);
+ var searchPage = new SearchPageViewModel();
_navBar = new NavBarViewModel(MainScreen, walletManager);

MODIFY
WalletWasabi.Fluent/ViewModels/Search/SearchItemViewModel.cs
WalletWasabi.Fluent/ViewModels/Search/SearchItemViewModel.cs
-using System;
-using System.Threading.Tasks;
using System.Windows.Input;
using ReactiveUI;
-using WalletWasabi.Fluent.ViewModels.NavBar;
using WalletWasabi.Fluent.ViewModels.Navigation;
-using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Fluent.ViewModels.Search
{
@@ -35,7 +31,7 @@ namespace WalletWasabi.Fluent.ViewModels.Search
public SearchCategory Category { get; }
- public string Keywords => _metaData.Keywords.ToString();
+ public string[] Keywords => _metaData.Keywords;
public ICommand OpenCommand { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/Search/SearchPageViewModel.cs
WalletWasabi.Fluent/ViewModels/Search/SearchPageViewModel.cs
@@ -17,19 +17,17 @@ namespace WalletWasabi.Fluent.ViewModels.Search
NavBarPosition = NavBarPosition.Bottom)]
public partial class SearchPageViewModel : NavBarItemViewModel
{
- private readonly WalletManagerViewModel _walletManager;
private readonly Dictionary<string, SearchCategory> _categories;
private readonly Dictionary<SearchCategory, SourceList<SearchItemViewModel>> _categorySources;
private ReadOnlyObservableCollection<SearchResult>? _searchResults;
private IObservable<IChangeSet<SearchItemViewModel>>? _sourceObservable;
[AutoNotify] private string? _searchQuery;
- public SearchPageViewModel(WalletManagerViewModel walletManager)
+ public SearchPageViewModel()
{
Title = "Search";
_categories = new Dictionary<string, SearchCategory>();
_categorySources = new Dictionary<SearchCategory, SourceList<SearchItemViewModel>>();
- _walletManager = walletManager;
RegisterCategory("Wallets", 2);
}
@@ -108,7 +106,7 @@ namespace WalletWasabi.Fluent.ViewModels.Search
if (!string.IsNullOrWhiteSpace(searchQuery)
&& !searchQuery.Contains(',', StringComparison.OrdinalIgnoreCase))
{
- return item.Keywords.Contains(searchQuery, StringComparison.OrdinalIgnoreCase) ||
+ return item.Keywords.Any(x => x.Contains(searchQuery, StringComparison.OrdinalIgnoreCase)) ||
item.Caption.Contains(searchQuery, StringComparison.OrdinalIgnoreCase);
}
return true;

fix keyword search.