Skip to content

Commit

Permalink
fix: failing windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsashah45 committed Aug 27, 2024
1 parent c37bf3a commit 5b55fa4
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using System.Runtime.CompilerServices;
using System.Threading.Tasks;

internal class LoggingSelectionInfo : ICollectionView, ISelectionInfo, IList<object>, INotifyCollectionChanged, INotifyPropertyChanged, IObservableVector<object>
internal class LoggingSelectionInfo : ICollectionView, ISelectionInfo, IList<object>, INotifyCollectionChanged, INotifyPropertyChanged
{
private readonly List<object> _collection = new List<object>();
private readonly HashSet<int> _selectedIndices = new HashSet<int>();
Expand Down Expand Up @@ -79,7 +79,7 @@ public bool MoveCurrentToPosition(int index)

public bool CanSort => SortDescriptions != null;

public IObservableVector<object> CollectionGroups { get; } = new ObservableVector<object>();
public IObservableVector<object> CollectionGroups { get; } = null;

public bool CanGroup => false;

Expand Down Expand Up @@ -196,29 +196,25 @@ public void Add(object item)
{
_collection.Add(item);
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item));
OnVectorChanged(CollectionChange.ItemInserted, _collection.Count - 1);
}

public void Insert(int index, object item)
{
_collection.Insert(index, item);
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item, index));
OnVectorChanged(CollectionChange.ItemInserted, index);
}

public void RemoveAt(int index)
{
var removedItem = _collection[index];
_collection.RemoveAt(index);
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, removedItem, index));
OnVectorChanged(CollectionChange.ItemRemoved, index);
}

public void Clear()
{
_collection.Clear();
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
OnVectorChanged(CollectionChange.Reset, 0);
}

public void CopyTo(object[] array, int arrayIndex)
Expand All @@ -233,7 +229,6 @@ public bool Remove(object item)
{
_collection.RemoveAt(index);
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, index));
OnVectorChanged(CollectionChange.ItemRemoved, index);
return true;
}
return false;
Expand Down

0 comments on commit 5b55fa4

Please sign in to comment.