add some comments

This commit is contained in:
qianlifeng
2014-01-14 23:31:24 +08:00
parent 820d0cde86
commit ea0e80b12b
2 changed files with 10 additions and 2 deletions

View File

@@ -232,13 +232,14 @@ namespace WinAlfred
progressBar.Dispatcher.Invoke(new Action(StopProgress)); progressBar.Dispatcher.Invoke(new Action(StopProgress));
if (list.Count > 0) if (list.Count > 0)
{ {
//todo:this used be opened to users, it's they choise use it or not in thier workflows
list.ForEach(o => list.ForEach(o =>
{ {
o.Score += selectedRecords.GetSelectedCount(o); o.Score += selectedRecords.GetSelectedCount(o);
}); });
resultCtrl.Dispatcher.Invoke(new Action(() => resultCtrl.Dispatcher.Invoke(new Action(() =>
{ {
List<Result> l = list.Where(o => o.OriginQuery != null && o.OriginQuery.RawQuery == tbQuery.Text).OrderByDescending(o => o.Score).ToList(); List<Result> l = list.Where(o => o.OriginQuery != null && o.OriginQuery.RawQuery == tbQuery.Text).ToList();
resultCtrl.AddResults(l); resultCtrl.AddResults(l);
})); }));
} }

View File

@@ -74,7 +74,14 @@ namespace WinAlfred
{ {
if ((currentScore >= next.Result.Score && currentScore <= prev.Result.Score)) if ((currentScore >= next.Result.Score && currentScore <= prev.Result.Score))
{ {
location = index; if (currentScore == next.Result.Score)
{
location = index + 1;
}
else
{
location = index;
}
} }
} }
} }