From 6625a2afd34f66122563c05de53b33b7f8e777a2 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 29 Sep 2019 15:17:40 +1000 Subject: [PATCH] Update mainview model with new code --- Wox/ViewModel/MainViewModel.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Wox/ViewModel/MainViewModel.cs b/Wox/ViewModel/MainViewModel.cs index afee65f060..2a7781e1b2 100644 --- a/Wox/ViewModel/MainViewModel.cs +++ b/Wox/ViewModel/MainViewModel.cs @@ -305,8 +305,8 @@ namespace Wox.ViewModel { var filtered = results.Where ( - r => StringMatcher.IsMatch(r.Title, query) || - StringMatcher.IsMatch(r.SubTitle, query) + r => StringMatcher.FuzzySearch(query, r.Title).IsSearchPrecisionScoreMet() + || StringMatcher.FuzzySearch(query, r.SubTitle).IsSearchPrecisionScoreMet() ).ToList(); ContextMenu.AddResults(filtered, id); } @@ -348,8 +348,8 @@ namespace Wox.ViewModel { var filtered = results.Where ( - r => StringMatcher.IsMatch(r.Title, query) || - StringMatcher.IsMatch(r.SubTitle, query) + r => StringMatcher.FuzzySearch(query, r.Title).IsSearchPrecisionScoreMet() || + StringMatcher.FuzzySearch(query, r.SubTitle).IsSearchPrecisionScoreMet() ).ToList(); History.AddResults(filtered, id); }