Fix UI flickering under .net 4.5

1. This is part of .net 4.5 fix, check #393 to see more
2. This bug is introduced since commit df4ca3fecc9784a3b55f93806d8b2a662523056f
This commit is contained in:
bao-qian
2016-01-02 06:59:06 +00:00
parent 4d25d505e0
commit f9e27ef67c
3 changed files with 25 additions and 25 deletions

View File

@@ -30,9 +30,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,
@@ -62,8 +62,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)