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.
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
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
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.