From 5028753367facb269ac226477091b77fad966f17 Mon Sep 17 00:00:00 2001
From: Paul Coroneos <paul.coroneos@icloud.com>
Date: Fri, 22 Nov 2024 05:59:47 -0600
Subject: Fix lightbox spinner (#6561)

* refactor imageitem useanimatedreaction logic

* revert copy/paste fix

* revert last commit

* Fix conditions

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
---
 .../lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx    | 6 +++---
 1 file changed, 3 insertions(+), 3 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 c7be4f3e3..d42fb70c1 100644
--- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx
+++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx
@@ -187,10 +187,10 @@ const ImageItem = ({
       return transforms.get().isResting && !hasLoaded
     },
     (show, prevShow) => {
-      if (show && !prevShow) {
-        runOnJS(setShowLoader)(false)
-      } else if (!prevShow && show) {
+      if (!prevShow && show) {
         runOnJS(setShowLoader)(true)
+      } else if (prevShow && !show) {
+        runOnJS(setShowLoader)(false)
       }
     },
   )
-- 
cgit 1.4.1

