Update src/components/Lightbox/pager/ImagePager.tsx

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
This commit is contained in:
Spence Pope
2026-07-01 10:28:29 -04:00
committed by GitHub
parent 4f0392554b
commit 7376d7afd6
@@ -253,6 +253,9 @@ function ImageView({
const dismissSwipeTranslateY = useSharedValue(0)
const isFlyingAway = useSharedValue(false)
// Hold the neighbor window at 0 until the open animation completes, so we
// only decode the active image during the most memory-constrained moment.
// Mirrors the orientation-unlock gate below.
// Hold the neighbor window at 0 until the open animation completes, so we
// only decode the active image during the most memory-constrained moment.
// Mirrors the orientation-unlock gate below.
@@ -265,6 +268,14 @@ function ImageView({
},
)
// On a rotation remount openProgress is already 1, so the reaction above
// never sees a change; seed the flag directly for that case.
useEffect(() => {
if (openProgress.get() === 1) {
setHasFullyOpened(true)
}
}, [openProgress])
const containerStyle = useAnimatedStyle(() => {
if (openProgress.get() < 1) {
return {