@@ -72,7 +72,6 @@ export const SwipeableContainer = (props: SwipeableContainerProps): ReactElement
7272 const [ activeIndex , setActiveIndex ] = useState ( 0 ) ;
7373 const flashList = useRef < FlashListRef < any > > ( null ) ;
7474 const isInitializing = useRef ( true ) ;
75- const isInternalUpdate = useRef ( false ) ;
7675
7776 const rtlSafeIndex = useCallback (
7877 ( i : number ) : number => ( isAndroidRTL ? props . slides . length - 1 - i : i ) ,
@@ -92,12 +91,6 @@ export const SwipeableContainer = (props: SwipeableContainerProps): ReactElement
9291 ) ;
9392
9493 useEffect ( ( ) => {
95- // Skip if this change was triggered by our own navigation
96- if ( isInternalUpdate . current ) {
97- isInternalUpdate . current = false ;
98- return ;
99- }
100-
10194 const slide = refreshActiveSlideAttribute ( props . slides , props . activeSlide ) ;
10295 if ( width && props . activeSlide ?. status === ValueStatus . Available && slide !== activeIndex ) {
10396 goToSlide ( slide ) ;
@@ -197,8 +190,6 @@ export const SwipeableContainer = (props: SwipeableContainerProps): ReactElement
197190 const onSlideChange = useCallback (
198191 ( newIndex : number , lastIndex : number ) : void => {
199192 if ( props . activeSlide && ! props . activeSlide . readOnly ) {
200- // Mark this as an internal update before setting the value
201- isInternalUpdate . current = true ;
202193 props . activeSlide . setValue ( new Big ( newIndex + 1 ) ) ;
203194 }
204195 if ( props . onSlideChange ) {
0 commit comments