IncrementalListView
IncrementalListView copied to clipboard
Grouped listview
Sorry, currently not a reproducable poc available. But it seems that if we have a grouped list that will fetch items with LoadMoreItems, we sometimes don't trigger the get more method.
If there are groups that are mixed with x amount of items lager and lesser than the preloadcount, we are able to scroll past that count and hit the bottom of the list, even if there should be new items loaded. BUT scrolling back up to top, reach a group with enough items, the load more is again retriggerd.
Hard to pin point the exact root cause, guessing the count of item source is the culprit here.
@Depechie,
I've hacked together a way to support grouping. It's looking like a bad idea. Take a peek:
https://github.com/therealjohn/IncrementalListView/blob/feature-grouping/Source/IncrementalListView/IncrementalListView.FormsPlugin/IncrementalListView.cs#L61-L91
I don't like that I have to find nested indexes. For this trivial example it's fine, but for a complicated ListView I am assuming this could be a performance snag. I'm going to think about it some more. Let me know your thoughts.
To be honest thinking it could be an edge case... it certainly was not easy to force the problem in the poc. So maybe leave it open a bit till other people complain ;)
It is certainly broken with IsGroupingEnabled and using a collection structure similar to my samples in that branch. The code to find an item by index will always fail because it's comparing against headers and not the actual nested content. That results in bad calculations for preloading. It might "appear" to work, but it's not really doing what you expect when you expect it.
And for the issue you saw, that might have been an edge case where it didn't get called at all. :(