-
-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use CollectionView on tvOS LibraryView #182
Conversation
Per your comment about the main thread pausing when getting the next page, I think that it's weird because the network call should be asynchronous. For this work about the collection view, it isn't a blocker and will be it's own bug to be fixed. |
My latest commit fixes a bug in my row math that was causing some duplication / id collisions between rows, which I think may have been primarily responsible for the performance hitch at next page request. There is still a small stutter at the point of loading next page, but it is much better now. I am also considering adding a loading spinner in the final cell that can be activated when next page is loading. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Ok, added one more commit that adds a progress view / loading spinner as the final cell when a next page exists. This makes the page loading moment feel a little better. I can be done editing this branch now. |
Replaces LazyVGrid with SwiftUICollectionView on the tvOS LibraryView.
This dramatically improves scrolling performance on tvOS!
However, there is an issue:
When scrolling through the library and reaching the end of a page, the next page is requested via LibraryViewModel. Currently the next page request seems to have a blocking effect on the UI, and it is frozen until the next page request is complete.
I'd appreciate any feedback on how to address that issue so fetching the next page does not block the UI.
Thanks!