Fix iOS image loading errors on the feed.
Ticket(s) / Related Merge Requests
Summary of Changes
- Added useRecycledState hook to have recycler-friendly states
- Fixed the iOS image errors on the feeds
This MR address two different issues that where causing the iOS media problems:
-
The expo-image package is throwing errors when loading images, even if the images are loaded correctly. It seems to be something with the SDWebImage library that it uses. I tried updating SDWebImage by patching the expo-image package but the error is still happening. I added a workaround to ignore this error for now.
-
The MediaViewImage package has an error state causing issues when recycling components. If an image was getting this random error (1) it was marked as failed, and when the same component was recycled, the next activity was rendered with the error state as true by default. To solve this I created a
useRecycledState
to keep states on entities that are recycled.
-
Changelog file updated with this template (one or more) -
Added for new features. -
Changed for changes in existing functionality. -
Deprecated for soon-to-be removed features. -
Removed for now removed features. -
Fixed for any bug fixes. -
Security in case of vulnerabilities.
-
Testing Considerations
Scroll the feed and loading media errors should be rare.
Regression Scope
Only images should be affected
Platform Affected (web, mobile, etc)
both, but the issue was happening only on iOS
Developer Testing Completed
Android and iOS devices
Screenshots
Does this impact
-
Localization -
Dark/light mode -
Guest mode