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

Refresh homeview automatically #278

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

knbx
Copy link

@knbx knbx commented Jan 9, 2022

I noticed the refresh control sometimes doesn't trigger when pulling down. I haven't been able to reproduce it on the simulator yet, but I figured it's always nicer when the app refreshes automatically.

Small expansion to RefreshHelper so it will refresh the homeview on appear, if it's been at least a minute since last refresh.

@LePips
Copy link
Member

LePips commented Jan 9, 2022

Thank you as this is something I've thought about as well for better home screen updating. However, I'll test this out to make sure the behavior is something that we want.

@knbx
Copy link
Author

knbx commented Jan 9, 2022

Sure thing.

It seemed a decent fix for my use case, where the home screen would still show the last episode when returning after playing an ep.
Ideally the detail screen would also automatically refresh I think, so you can back out of a movie and the app would update the last played position.

@LePips
Copy link
Member

LePips commented Jan 9, 2022

I have an idea for the detail screen that I can get to soon.

I did try an implementation where the home screen would update upon closing playback but there was an issue where it would then pop the navigation back to the home screen. I sadly don't have that work indexed anywhere in git history.

@knbx
Copy link
Author

knbx commented Jan 9, 2022

That does sound annoying.

I guess from a performance standpoint it would be ideal if, after playback, the local data was updated to change the last position or mark the media as watched.

But that could be difficult (I haven't looked at how data is saved in app). And eventually the app would still be outdated because of server side changes, such as newly added media. Seems overkill to me.

@LePips
Copy link
Member

LePips commented Jan 9, 2022

Actually, more specifically, I made it so that it updated only the Resume and Next Up items on playback close. That's only a few items so it's just fine. I guess I can take another look at that implementation and work around the home screen popping-whatever with a trick.

Looks and works great, this will be merged after the chain from #275 so there may be merge issues then.

@knbx
Copy link
Author

knbx commented Jan 9, 2022

Sweet, I'll take a look after those PRs merge.

@LePips LePips merged commit 2d59575 into jellyfin:main Jan 10, 2022
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.

None yet

2 participants