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

Newly added widgets are blank #68

Open
skjiisa opened this issue Aug 14, 2021 · 0 comments
Open

Newly added widgets are blank #68

skjiisa opened this issue Aug 14, 2021 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@skjiisa
Copy link
Owner

skjiisa commented Aug 14, 2021

I had a bad network connection and the widget showed every track as having no ticks except for one which was displayed normally.

Edit: I think I actually was misinterpreting the data when this happened and it isn't an issue. Repurposing this issue for other widget performance related issue:

Newly added widgets can be blank for a while while fetching data from CloudKit, especially with a bad network connection. I can think of two possible solutions:

  1. Only perform a CloudKit fetch if the network connection is strong
  2. In getSnapshot(for:in:completion:), reset the last update time so that new widgets don't try to fetch new data

As far as I can see, the second solution would be much better. The first could potentially also be used alongside it for rare cases where widgets are loaded without a previous timeline entry and without a recent snapshot (maybe on device boot or enabling a home screen).

@skjiisa skjiisa added the bug Something isn't working label Aug 14, 2021
@skjiisa skjiisa added this to the v1.3 milestone Sep 30, 2021
@skjiisa skjiisa changed the title Widget can show blank info on bad network Newly added widgets are blank Sep 30, 2021
@skjiisa skjiisa modified the milestones: v1.3, v1.4 Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant