mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Merge pull request #454 from Wox-launcher/dotnet45
Upgrade Wox to .net 4.5
This commit is contained in:
@@ -29,9 +29,9 @@ namespace Wox.Plugin.Program
|
||||
{
|
||||
|
||||
var fuzzyMather = FuzzyMatcher.Create(query.Search);
|
||||
var results = programs.Where(o => MatchProgram(o, fuzzyMather)).
|
||||
var results = programs.Where(p => MatchProgram(p, fuzzyMather)).
|
||||
Select(ScoreFilter).
|
||||
OrderByDescending(o => o.Score)
|
||||
OrderByDescending(p => p.Score)
|
||||
.Select(c => new Result()
|
||||
{
|
||||
Title = c.Title,
|
||||
@@ -53,8 +53,7 @@ namespace Wox.Plugin.Program
|
||||
{
|
||||
var scores = new List<string> { program.Title, program.PinyinTitle, program.AbbrTitle, program.ExecuteName };
|
||||
program.Score = scores.Select(s => matcher.Evaluate(s ?? string.Empty).Score).Max();
|
||||
if (program.Score > 0) return true;
|
||||
else return false;
|
||||
return program.Score > 0;
|
||||
}
|
||||
|
||||
public void Init(PluginInitContext context)
|
||||
|
||||
Reference in New Issue
Block a user