IncrementalListView icon indicating copy to clipboard operation
IncrementalListView copied to clipboard

Grouped listview

Open Depechie opened this issue 8 years ago • 3 comments

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 avatar Mar 06 '17 12:03 Depechie

@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.

therealjohn avatar Mar 07 '17 17:03 therealjohn

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 ;)

Depechie avatar Mar 07 '17 19:03 Depechie

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. :(

therealjohn avatar Mar 07 '17 19:03 therealjohn