From 58e261676bd4a1d2dbac30ee2e9202b5f181eba3 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 2 Nov 2024 01:28:18 +0000 Subject: [PATCH] Opacity for controls --- 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 967690eb4a..762a3604be 100644 --- a/src/view/com/lightbox/ImageViewing/index.tsx +++ b/src/view/com/lightbox/ImageViewing/index.tsx @@ -73,7 +73,7 @@ function ImageViewing({ const show = showControls && dismissSwipeTranslateY.value === 0 return { pointerEvents: show ? 'auto' : 'none', - opacity: withClampedSpring(show && openProgress.value > 0 ? 1 : 0), + opacity: withClampedSpring(show && openProgress.value === 1 ? 1 : 0), transform: [ { translateY: withClampedSpring(show ? 0 : -30), @@ -85,7 +85,7 @@ function ImageViewing({ const show = showControls && dismissSwipeTranslateY.value === 0 return { pointerEvents: show ? 'auto' : 'none', - opacity: withClampedSpring(show && openProgress.value > 0 ? 1 : 0), + opacity: withClampedSpring(show && openProgress.value === 1 ? 1 : 0), transform: [ { translateY: withClampedSpring(show ? 0 : 30),