fix: remove cache property if using fallback
iOS image has its own properties for cache and if fallback is true and regular image is being rendered we can't set FastImage's cache value because it doesn't match.
This commit is contained in:
parent
2eb3199143
commit
ba0f238821
|
@ -143,9 +143,11 @@ function FastImageBase({
|
|||
forwardedRef,
|
||||
...props
|
||||
}: FastImageProps & { forwardedRef: React.Ref<any> }) {
|
||||
const resolvedSource = Image.resolveAssetSource(source as any)
|
||||
|
||||
if (fallback) {
|
||||
const cleanedSource = { ...(source as any) }
|
||||
delete cleanedSource.cache
|
||||
const resolvedSource = Image.resolveAssetSource(cleanedSource)
|
||||
|
||||
return (
|
||||
<View style={[styles.imageContainer, style]} ref={forwardedRef}>
|
||||
<Image
|
||||
|
@ -164,6 +166,8 @@ function FastImageBase({
|
|||
)
|
||||
}
|
||||
|
||||
const resolvedSource = Image.resolveAssetSource(source as any)
|
||||
|
||||
return (
|
||||
<View style={[styles.imageContainer, style]} ref={forwardedRef}>
|
||||
<FastImageView
|
||||
|
|
Loading…
Reference in New Issue