Skip to content

Commit b5d16c9

Browse files
author
Oren Novotny
committed
Add a where clause so we don't call secionCollectionChanged if there's nothing to do
1 parent 788eab3 commit b5d16c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ReactiveUI.Platforms/Cocoa/CommonReactiveSource.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,10 @@ void resetupAll(IReadOnlyList<TSectionInfo> newSectionInfo)
284284
.Changed
285285
.Select(timestamped)
286286
.Buffer(TimeSpan.FromMilliseconds(250), RxApp.MainThreadScheduler)
287+
.Where(b => b.Count > 0)
287288
.Subscribe(
288289
xs => sectionCollectionChanged(section, xs),
289-
ex => this.Log().ErrorException("Error while watching section " + i + "'s Collection.", ex)));
290+
ex => this.Log().ErrorException("Error while watching section " + section + "'s Collection.", ex)));
290291
}
291292

292293
this.Log().Debug("Done resetuping section data and bindings!");

0 commit comments

Comments
 (0)