Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
fix: interaction manager in stack (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
osdnk committed Jan 3, 2020
1 parent 8c5f840 commit 6b9b999
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/stack/src/views/Stack/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,16 @@ export default class Card extends React.Component<Props> {
const animation =
spec.animation === 'spring' ? Animated.spring : Animated.timing;

this.handleStartInteraction();
onTransitionStart?.({ closing: Boolean(closing) });
animation(gesture, {
isInteraction: false,
...spec.config,
velocity,
useNativeDriver: true,
toValue,
}).start(({ finished }) => {
this.handleEndInteraction();
if (finished) {
if (closing) {
onClose();
Expand Down Expand Up @@ -229,7 +232,6 @@ export default class Card extends React.Component<Props> {
break;
case GestureState.END: {
this.isSwiping.setValue(FALSE);
this.handleEndInteraction();

let distance;
let translation;
Expand Down

0 comments on commit 6b9b999

Please sign in to comment.