From 092494f891995e2a4e67c7497d7647f989f4e231 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 2 Nov 2024 15:43:05 +0000 Subject: [PATCH] Adjust velocity factor --- src/view/com/lightbox/ImageViewing/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/com/lightbox/ImageViewing/index.tsx b/src/view/com/lightbox/ImageViewing/index.tsx index e42ff34e6a..ee402bd7ba 100644 --- a/src/view/com/lightbox/ImageViewing/index.tsx +++ b/src/view/com/lightbox/ImageViewing/index.tsx @@ -138,7 +138,7 @@ function ImageViewing({ if (Math.abs(e.velocityY) > 1000) { dismissSwipeTranslateY.value = withDecay({ velocity: e.velocityY, - velocityFactor: 2, + velocityFactor: Math.max(3000 / Math.abs(e.velocityY), 1), // Speed up if it's too slow. deceleration: 1, // Danger! This relies on the reaction below stopping it. }) } else {