Fix MobX crash for Android lightbox (#1668)
* Fix MobX crash for Android lightbox * Reorder props to match between forkszio/stable
parent
209d8b683c
commit
aad8d12ede
|
@ -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)}
|
||||||
|
|
Loading…
Reference in New Issue