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

Refreshes are a bit buggy #65

Open
kanielrkirby opened this issue Apr 18, 2024 · 1 comment
Open

Refreshes are a bit buggy #65

kanielrkirby opened this issue Apr 18, 2024 · 1 comment

Comments

@kanielrkirby
Copy link
Contributor

It seems that 1, refreshes block the app completely until they're done (which can take up to ~5 seconds), and 2, if you refresh when in the filtered view, your list becomes completely empty.

For point 1, I think it should probably be possible to put the logic for refreshing inside a goroutine, and set an internal variable for "refreshing" or something similar, so that the app doesn't compeletely stop for several seconds.

For point 2, I think the Filter Function just needs to trigger again, but I'm not 100% sure on how to force that. We might just run ResetFilter() if nothing else, so that the user isn't greeted with a completely blank page just from running refresh.

@guyfedwards
Copy link
Owner

guyfedwards commented Apr 18, 2024

  1. Not sure what the best solution is here. The fetching itself is concurrent but fetching all the feeds blocks the UI update. We could set a 'refreshing' status message which at least gives feedback about it happening, or we could async all of the refresh call but then have to figure out how to get the updated items into the UI without it feeling janky/jumping around/messing with selected index etc. I would favour showing a message for now vs having to reconcile the list but we might be able to have it display nicely, or have another keypress to udpate the UI once the background fetching has finished
  2. This seems like the same state is happening as when going filtered > article > esc. Resetting the filter is probably a quick win here until we figure out the root cause.
    (doing some quick debugging I can see the model state is still 'filter applied' when showing the 'No items found.' message

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

No branches or pull requests

2 participants