Fix MobX crash for Android lightbox (#1668)

* Fix MobX crash for Android lightbox

* Reorder props to match between forks
zio/stable
dan 2023-10-10 23:02:00 +01:00 committed by GitHub
parent 209d8b683c
commit aad8d12ede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -307,8 +307,9 @@ const ImageItem = ({
)}
<GestureDetector gesture={composedGesture}>
<AnimatedImage
source={imageSrc}
contentFit="contain"
// NOTE: Don't pass imageSrc={imageSrc} or MobX will break.
source={{uri: imageSrc.uri}}
style={[styles.image, animatedStyle]}
accessibilityLabel={imageSrc.alt}
accessibilityHint=""

View File

@ -143,6 +143,7 @@ const ImageItem = ({imageSrc, onZoom, onRequestClose}: Props) => {
accessibilityHint="">
<AnimatedImage
contentFit="contain"
// NOTE: Don't pass imageSrc={imageSrc} or MobX will break.
source={{uri: imageSrc.uri}}
style={[styles.image, animatedStyle]}
onLoad={() => setLoaded(true)}