This repository has been archived by the owner on May 1, 2024. It is now read-only.
Allow third party libs to display animated images correctly in view recycling scenarios #6153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Background: Third party libs can now be used with
Image
view (after registeringIImageSourceHandler
)This change won't affect standard image loading. It'll allow third party libs like FFImageLoading to display animated images correctly in view recycling scenarios. Without this, after scrolling, animated images are not shown at all (layout invalidation is not initiated).
FFImageLoading also uses this workaround: https://github.com/luberda-molinet/FFImageLoading/blob/90ed8eef65ed1c9a57a4e4ce477a98c70548de5c/source/FFImageLoading.Touch/Targets/UIImageViewTarget.cs#L50-L51
API Changes
None
Platforms Affected
MacOS
BTW: I also tried to apply similar fix for MacOS but
ImageRenderer
doesn't useNSImageView
at all (which supports animations). What's the reason of usingNSView
instead of usingNSImageView
?