Skip to content
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

iOS - Home Screen Pull To Refresh #193

Merged
merged 2 commits into from
Oct 28, 2021

Conversation

LePips
Copy link
Member

@LePips LePips commented Oct 19, 2021

There was a long discussion about home screen refresh in #123

What's funny is that I thought we were never able to do a pull to refresh on ScrollView but then I found out https://github.com/siteline/SwiftUI-Introspect exists so we are able to access the underlying UIScrollView and add a UIRefreshControl. Right now it's "snappy" but I think that's okay for now.

However, this is just intermediary work until I implement a proper MediaManager object that "caches" the next up, resume, and "all received" items. I went down a long rabbit hole for an improper implementation of this but thought it wasn't worth it until I got that work done first. I am doing this right now because I have been needing something to update state of what I'm watching on the home screen. I may remove this in the future when I implement MediaManager, as it may be unnecessary.

@LePips LePips self-assigned this Oct 19, 2021
@sonarcloud
Copy link

sonarcloud bot commented Oct 19, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@LePips LePips linked an issue Oct 19, 2021 that may be closed by this pull request
Copy link
Member

@PangMo5 PangMo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, this method looks good temporarily.
But Swiftfin now supports iOS 15 or higher.
We can replace the HomeView's ScrollView with List and .listRowSeparator(.hidden).
After that, we can use refreshable.

@LePips
Copy link
Member Author

LePips commented Oct 27, 2021

@acvigue Could we get this merged please?

@acvigue acvigue merged commit 63676a8 into jellyfin:main Oct 28, 2021
@LePips LePips deleted the update-home-view-items branch January 17, 2022 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Home screen refresh
3 participants