Update score when titles are same

This commit is contained in:
bao-qian 2016-01-06 04:58:31 +00:00
parent e8e5c8dff1
commit 3c27b50ff6

View File

@ -18,7 +18,7 @@ namespace Wox.Helper
List<Result> itemsToRemove = Items.Where(x => predicate(x)).ToList();
if (itemsToRemove.Count > 0)
{
itemsToRemove.ForEach(item => Items.Remove(item));
OnPropertyChanged(new PropertyChangedEventArgs("Count"));
@ -40,10 +40,14 @@ namespace Wox.Helper
{
Result oldItem = Items[i];
Result newItem = newItems[i];
if (!Equals(oldItem, newItem))
if (!oldItem.Equals(newItem))
{
this[i] = newItem;
}
else if (oldItem.Score != newItem.Score)
{
this[i].Score = newItem.Score;
}
}
if (newCount > oldCount)