Skip to content

Commit 4afea51

Browse files
committed
chore: rebase main
1 parent 271ff7d commit 4afea51

2 files changed

Lines changed: 84 additions & 24 deletions

File tree

packages/pluggableWidgets/intro-screen-native/src/SwipeableContainer.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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) {

pnpm-lock.yaml

Lines changed: 84 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)