Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Commit

Permalink
Revert "fix: move onIndexChange (#1384)"
Browse files Browse the repository at this point in the history
This reverts commit 4616336.
  • Loading branch information
okwasniewski authored Sep 1, 2022
1 parent 4616336 commit dbb683d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/PanResponderAdapter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ export default function PanResponderAdapter<T extends Route>({

const { timing, ...transitionConfig } = DefaultTransitionSpec;

onIndexChangeRef.current(index);

Animated.parallel([
timing(panX, {
...transitionConfig,
Expand All @@ -91,6 +89,7 @@ export default function PanResponderAdapter<T extends Route>({
}),
]).start(({ finished }) => {
if (finished) {
onIndexChangeRef.current(index);
pendingIndexRef.current = undefined;
}
});
Expand Down

0 comments on commit dbb683d

Please sign in to comment.