Fix refreshing status and corrupted cached data on the GraphQL newsfeed
Ticket(s) / Related Merge Requests
Summary of Changes
-
The newsfeed was refreshing correctly but it was removing the loading indicator too fast, even before the API call finishes. I solved this using the
isRefetching
propery of react-query, sinceisLoading
doesn't seems to work wheninitialData
is set. -
I found that the cached information was corrupted in some cases, causing emtpy Highlights and other problems on the feed. I reopened #5262 (closed) and solved the issue.
Testing Considerations
Refresh should work as expected. The refreshing indicator now remains until the refresh finishes.
The cached information is shown properly. (After opening the app again)
Regression Scope
Newsfeed refresh and caching
Platform Affected (web, mobile, etc)
both
Developer Testing Completed
ios/android
Screenshots
Does this impact
-
Localization -
Dark/light mode -
Guest mode