Fix incrementing -1
indices
Fixes https://github.com/Cysharp/ObservableCollections/issues/89
This commit is contained in:
parent
a16edc16ed
commit
7c4974c36a
@ -167,10 +167,12 @@ sealed class ObservableCollectionChanged<T>(IObservableCollection<T> collection,
|
||||
eventArgs.Action,
|
||||
item,
|
||||
eventArgs.OldItem,
|
||||
i++,
|
||||
newStartingIndex: i,
|
||||
eventArgs.OldStartingIndex,
|
||||
eventArgs.SortOperation);
|
||||
|
||||
if (eventArgs.NewStartingIndex != -1) i++;
|
||||
|
||||
observer.OnNext(newArgs);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user