Fix ObservableDictionary.ToNotifyCollectionChanged #71

This commit is contained in:
neuecc 2024-09-13 00:36:57 +09:00
parent 9fe7a38b96
commit 3d26e1d9de

View File

@ -1,4 +1,4 @@
using ObservableCollections.Internal; using ObservableCollections.Internal;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -272,7 +272,10 @@ internal class NonFilteredSynchronizedViewList<T, TView> : ISynchronizedViewList
{ {
if (e.NewStartingIndex == -1) if (e.NewStartingIndex == -1)
{ {
var index = listView.Count;
listView.Add(e.NewItem.View); listView.Add(e.NewItem.View);
OnCollectionChanged(e.WithNewStartingIndex(index));
return;
} }
else else
{ {