Lazy-loading collection now only increases its version when the total item count changes
This commit is contained in:
parent
246c90f7c8
commit
b44b2b406b
@ -811,12 +811,14 @@ namespace Nuclex.Avalonia.Collections {
|
||||
if(fetchedItemCount < this.pageSize) {
|
||||
itemCount = offset + fetchedItemCount;
|
||||
lock(this) {
|
||||
if(itemCount < this.assumedCount) {
|
||||
this.assumedCount = itemCount;
|
||||
}
|
||||
#if DEBUG
|
||||
++this.version;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The count may have been adjusted if this truncated the list,
|
||||
// so recalculate the actual number of items. Then send out change
|
||||
|
Loading…
Reference in New Issue
Block a user