about summary refs log tree commit diff
path: root/src/view/com/lightbox/ImageViewing
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/lightbox/ImageViewing')
-rw-r--r--src/view/com/lightbox/ImageViewing/index.tsx18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/view/com/lightbox/ImageViewing/index.tsx b/src/view/com/lightbox/ImageViewing/index.tsx
index 41a54eba6..bb3c39f59 100644
--- a/src/view/com/lightbox/ImageViewing/index.tsx
+++ b/src/view/com/lightbox/ImageViewing/index.tsx
@@ -510,20 +510,22 @@ function LightboxImage({
           // This is a bug in Reanimated, but for now we'll work around it like this.
           dismissSwipeTranslateY.set(1)
         }
-        dismissSwipeTranslateY.set(() =>
-          withDecay({
+        dismissSwipeTranslateY.set(() => {
+          'worklet'
+          return withDecay({
             velocity: e.velocityY,
             velocityFactor: Math.max(3500 / Math.abs(e.velocityY), 1), // Speed up if it's too slow.
             deceleration: 1, // Danger! This relies on the reaction below stopping it.
-          }),
-        )
+          })
+        })
       } else {
-        dismissSwipeTranslateY.set(() =>
-          withSpring(0, {
+        dismissSwipeTranslateY.set(() => {
+          'worklet'
+          return withSpring(0, {
             stiffness: 700,
             damping: 50,
-          }),
-        )
+          })
+        })
       }
     })