From b4412f333381504f6e93ebbfb3f2b9fa9dab892d Mon Sep 17 00:00:00 2001
From: dan <dan.abramov@gmail.com>
Date: Sun, 10 Nov 2024 20:30:31 +0000
Subject: Fix render loop on Android (#6213)

---
 .../ImageViewing/components/ImageItem/ImageItem.ios.tsx      | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx')

diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx
index e6ec64c3d..f06a59ed6 100644
--- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx
+++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx
@@ -228,10 +228,14 @@ const ImageItem = ({
               accessibilityHint=""
               enableLiveTextInteraction={showControls && !scaled}
               accessibilityIgnoresInvertColors
-              onLoad={e => {
-                setHasLoaded(true)
-                onLoad({width: e.source.width, height: e.source.height})
-              }}
+              onLoad={
+                hasLoaded
+                  ? undefined
+                  : e => {
+                      setHasLoaded(true)
+                      onLoad({width: e.source.width, height: e.source.height})
+                    }
+              }
             />
           </Animated.View>
         </Animated.View>
-- 
cgit 1.4.1

