Skip to content

Commit

Permalink
Fix incrementing -1 indices
Browse files Browse the repository at this point in the history
Fixes #89
  • Loading branch information
erri120 committed Dec 13, 2024
1 parent a16edc1 commit 7c4974c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,12 @@ protected override void Handler(in NotifyCollectionChangedEventArgs<T> eventArgs
eventArgs.Action,
item,
eventArgs.OldItem,
i++,
newStartingIndex: i,
eventArgs.OldStartingIndex,
eventArgs.SortOperation);

if (eventArgs.NewStartingIndex != -1) i++;

observer.OnNext(newArgs);
}
}
Expand Down

0 comments on commit 7c4974c

Please sign in to comment.