diff --git a/src/ObservableCollections.R3/ObservableCollectionR3Extensions.cs b/src/ObservableCollections.R3/ObservableCollectionR3Extensions.cs index 21adea2..16d681b 100644 --- a/src/ObservableCollections.R3/ObservableCollectionR3Extensions.cs +++ b/src/ObservableCollections.R3/ObservableCollectionR3Extensions.cs @@ -167,10 +167,12 @@ protected override void Handler(in NotifyCollectionChangedEventArgs eventArgs eventArgs.Action, item, eventArgs.OldItem, - i++, + newStartingIndex: i, eventArgs.OldStartingIndex, eventArgs.SortOperation); + if (eventArgs.NewStartingIndex != -1) i++; + observer.OnNext(newArgs); } }