mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add index when calling NotifyCollectionChangeAction.Add
This commit is contained in:
parent
1a758c3919
commit
f388b75d26
1 changed files with 3 additions and 2 deletions
|
|
@ -267,12 +267,13 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
private void AddAll(List<ResultViewModel> Items)
|
||||
{
|
||||
foreach (var item in Items)
|
||||
for (int i = 0; i < Items.Count; i++)
|
||||
{
|
||||
var item = Items[i];
|
||||
if (_token.IsCancellationRequested)
|
||||
return;
|
||||
Add(item);
|
||||
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item));
|
||||
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item, i));
|
||||
}
|
||||
}
|
||||
public void RemoveAll(int Capacity = 512)
|
||||
|
|
|
|||
Loading…
Reference in a new issue