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

Blink fix #141

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Blink fix #141

wants to merge 3 commits into from

Conversation

dangilbert
Copy link

@dangilbert dangilbert commented Mar 8, 2023

There were a couple of issues causing the blinking on the home screen and on the season browser.

I haven't checked other screens yet, but my investigation told me that the DiffUtils/DiffCallback didn't seem to be working as expected.

For this I instead manually do a check before setting the items to see if there is a difference. Now it will only blink once when the content for the row is changing.

There was another issue with the way the coroutines were set up. They were being scheduled on start, every time the screen restarted. The schedule job was not being cancelled as the scope that it was being created is is only cancelled in onDestroy(), ending up with multiple instances of the refresh happening. If you went back and forth a few times you would see the refresh happening more and more frequently. Not a huge issue, but during my testing I set the refresh to every 10 seconds and I could consistently make the data refetch every couple of seconds by entering and exiting the season browser screen a few times. So I am manually cancelling the scheduled job in onStop on both the home screen and the season browser. This reduced the frequency of the blinking, even before resolving the blinking itself.

This should resolve issue #89

One other thing I changed was to only request the data for legacy seasons once, rather than every minute. I'm working on the basis that the older seasons won't have any content updates

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