about summary refs log tree commit diff
path: root/src/view/com/lightbox/Images.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/lightbox/Images.tsx')
-rw-r--r--src/view/com/lightbox/Images.tsx16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/view/com/lightbox/Images.tsx b/src/view/com/lightbox/Images.tsx
index 6f84dfe7c..7179f0887 100644
--- a/src/view/com/lightbox/Images.tsx
+++ b/src/view/com/lightbox/Images.tsx
@@ -1,7 +1,15 @@
 import React from 'react'
 import {Image, StyleSheet, useWindowDimensions, View} from 'react-native'
 
-export function Component({uris, index}: {uris: string[]; index: number}) {
+export function Component({
+  uris,
+  index,
+  isZooming,
+}: {
+  uris: string[]
+  index: number
+  isZooming: boolean
+}) {
   const winDim = useWindowDimensions()
   const left = index * winDim.width * -1
   return (
@@ -9,7 +17,11 @@ export function Component({uris, index}: {uris: string[]; index: number}) {
       {uris.map((uri, i) => (
         <Image
           key={i}
-          style={[styles.image, {left: i * winDim.width}]}
+          style={[
+            styles.image,
+            {left: i * winDim.width},
+            isZooming && i !== index ? {opacity: 0} : undefined,
+          ]}
           source={{uri}}
         />
       ))}