mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 11:09:28 +08:00
Update score when titles are same
This commit is contained in:
parent
e8e5c8dff1
commit
3c27b50ff6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user