Skip to content

Blink fix#141

Open
dangilbert wants to merge 3 commits intoleonardoxh:masterfrom
dangilbert:blink_fix
Open

Blink fix#141
dangilbert wants to merge 3 commits intoleonardoxh:masterfrom
dangilbert:blink_fix

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

st14n added a commit to st14n/race-control-tv that referenced this pull request Apr 15, 2025
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.

2 participants