Fix MobX crash for Android lightbox (#1668)
* Fix MobX crash for Android lightbox * Reorder props to match between forks
This commit is contained in:
@@ -307,8 +307,9 @@ const ImageItem = ({
|
|||||||
)}
|
)}
|
||||||
<GestureDetector gesture={composedGesture}>
|
<GestureDetector gesture={composedGesture}>
|
||||||
<AnimatedImage
|
<AnimatedImage
|
||||||
source={imageSrc}
|
|
||||||
contentFit="contain"
|
contentFit="contain"
|
||||||
|
// NOTE: Don't pass imageSrc={imageSrc} or MobX will break.
|
||||||
|
source={{uri: imageSrc.uri}}
|
||||||
style={[styles.image, animatedStyle]}
|
style={[styles.image, animatedStyle]}
|
||||||
accessibilityLabel={imageSrc.alt}
|
accessibilityLabel={imageSrc.alt}
|
||||||
accessibilityHint=""
|
accessibilityHint=""
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ const ImageItem = ({imageSrc, onZoom, onRequestClose}: Props) => {
|
|||||||
accessibilityHint="">
|
accessibilityHint="">
|
||||||
<AnimatedImage
|
<AnimatedImage
|
||||||
contentFit="contain"
|
contentFit="contain"
|
||||||
|
// NOTE: Don't pass imageSrc={imageSrc} or MobX will break.
|
||||||
source={{uri: imageSrc.uri}}
|
source={{uri: imageSrc.uri}}
|
||||||
style={[styles.image, animatedStyle]}
|
style={[styles.image, animatedStyle]}
|
||||||
onLoad={() => setLoaded(true)}
|
onLoad={() => setLoaded(true)}
|
||||||
|
|||||||
Reference in New Issue
Block a user