@@ -13,7 +13,6 @@ import React, { useEffect, useRef, useState } from "react";
1313import {
1414 Dimensions ,
1515 FlatList ,
16- Modal ,
1716 StyleSheet ,
1817 Text ,
1918 TouchableOpacity ,
@@ -32,10 +31,8 @@ const ProfileView = ({
3231> ) => {
3332 const progressValue = useSharedValue < number > ( 0 ) ;
3433 const width = Dimensions . get ( "window" ) . width ;
35- const [ fullScreenVisible , setFullScreenVisible ] = useState ( false ) ;
3634 const [ currentImageIndex , setCurrentImageIndex ] = useState ( 0 ) ;
3735 const carouselRef = useRef < ICarouselInstance > ( null ) ;
38- const fullScreenCarouselRef = useRef < ICarouselInstance > ( null ) ; // Ref for full-screen carousel
3936
4037 const renderPreviewImage = ( {
4138 item,
@@ -49,7 +46,6 @@ const ProfileView = ({
4946 onPress = { ( ) => {
5047 setCurrentImageIndex ( index ) ;
5148 carouselRef . current ?. scrollTo ( { index : index } ) ;
52- setFullScreenVisible ( true ) ;
5349 } }
5450 style = { styles . previewImageContainer }
5551 >
@@ -109,7 +105,6 @@ const ProfileView = ({
109105 < TouchableOpacity
110106 onPress = { ( ) => {
111107 setCurrentImageIndex ( index ) ;
112- setFullScreenVisible ( true ) ;
113108 } }
114109 >
115110 < OImageWithLoader
@@ -123,7 +118,6 @@ const ProfileView = ({
123118 < TouchableOpacity
124119 style = { styles . touchableContainer }
125120 onPress = { ( ) => {
126- setFullScreenVisible ( true ) ;
127121 setCurrentImageIndex ( 0 ) ;
128122 } }
129123 >
@@ -164,40 +158,6 @@ const ProfileView = ({
164158 style = { styles . previewList }
165159 />
166160 ) }
167-
168- < Modal
169- animationType = "fade"
170- transparent = { false }
171- visible = { fullScreenVisible }
172- onRequestClose = { ( ) => setFullScreenVisible ( false ) }
173- >
174- < View style = { styles . fullScreenContainer } >
175- < TouchableOpacity
176- style = { styles . closeButton }
177- onPress = { ( ) => setFullScreenVisible ( false ) }
178- >
179- < View style = { styles . closeButtonInner } >
180- < Text style = { styles . closeButtonText } > ×</ Text >
181- </ View >
182- </ TouchableOpacity >
183- < Carousel
184- ref = { fullScreenCarouselRef }
185- loop = { false }
186- width = { Dimensions . get ( "window" ) . width }
187- height = { Dimensions . get ( "window" ) . height }
188- data = { user . imageURIs }
189- scrollAnimationDuration = { 1000 }
190- defaultIndex = { currentImageIndex }
191- renderItem = { ( { item } ) => (
192- < OImageWithLoader
193- source = { { uri : item } }
194- style = { styles . fullScreenImage }
195- resizeMode = "contain"
196- />
197- ) }
198- />
199- </ View >
200- </ Modal >
201161 </ OPageContainer >
202162 ) ;
203163} ;
0 commit comments