From a5020016123b70e4c3bcb3a8a9f697238964223e Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 7 Nov 2024 11:25:55 +0000 Subject: [PATCH] Block swipe while opening --- src/view/com/lightbox/ImageViewing/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view/com/lightbox/ImageViewing/index.tsx b/src/view/com/lightbox/ImageViewing/index.tsx index 567f2c94c6..764dae0ed8 100644 --- a/src/view/com/lightbox/ImageViewing/index.tsx +++ b/src/view/com/lightbox/ImageViewing/index.tsx @@ -421,14 +421,14 @@ function LightboxImage({ .maxPointers(1) .onUpdate(e => { 'worklet' - if (isFlyingAway.value) { + if (openProgress.value !== 1 || isFlyingAway.value) { return } dismissSwipeTranslateY.value = e.translationY }) .onEnd(e => { 'worklet' - if (isFlyingAway.value) { + if (isFlyingAway.value || isFlyingAway.value) { return } if (Math.abs(e.velocityY) > 1000) {