Skip to content

Commit

Permalink
Remove supression of empty notificaton for source list. fixes #581 (#582
Browse files Browse the repository at this point in the history
)
  • Loading branch information
RolandPheasant authored Apr 29, 2022
1 parent 86b6f3f commit 6ce42aa
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/DynamicData/Cache/Internal/Sort.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ public Sorter(SortOptimisations optimisations, IComparer<TObject>? comparer = nu
/// </summary>
/// <param name="changes">The changes.</param>
/// <returns>The sorted change set.</returns>
public ISortedChangeSet<TObject, TKey>? Sort(IChangeSet<TObject, TKey> changes)
{
return DoSort(SortReason.DataChanged, changes);
}
public ISortedChangeSet<TObject, TKey>? Sort(IChangeSet<TObject, TKey> changes) => DoSort(SortReason.DataChanged, changes);

/// <summary>
/// Sorts all data using the specified comparer.
Expand All @@ -114,10 +111,7 @@ public Sorter(SortOptimisations optimisations, IComparer<TObject>? comparer = nu
/// Sorts all data using the current comparer.
/// </summary>
/// <returns>The sorted change set.</returns>
public ISortedChangeSet<TObject, TKey>? Sort()
{
return DoSort(SortReason.Reorder);
}
public ISortedChangeSet<TObject, TKey>? Sort() => DoSort(SortReason.Reorder);

/// <summary>
/// Sorts using the specified sorter. Will return null if there are no changes.
Expand Down Expand Up @@ -241,11 +235,6 @@ public Sorter(SortOptimisations optimisations, IComparer<TObject>? comparer = nu
throw new InvalidOperationException("The calculator has not been initialized");
}

if ((sortReason == SortReason.InitialLoad || sortReason == SortReason.DataChanged) && changeSet.Count == 0)
{
return null;
}

if (sortReason == SortReason.Reorder && changeSet.Count == 0)
{
return null;
Expand Down

0 comments on commit 6ce42aa

Please sign in to comment.