mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-26 05:25:30 +08:00
Fix Transitioner race condition (#3434)
This code was added during the events implementation, but I think we should be able to manage this circumstance from the parent context. In any case, any events bugs that result from this change will be far less insidious than the cardstack transitioner issue we experience now
This commit is contained in:
committed by
Brent Vatne
parent
63a6565afa
commit
03fbd98ce4
@@ -120,15 +120,6 @@ class Transitioner extends React.Component {
|
||||
]
|
||||
: [];
|
||||
|
||||
// When there are no animations happening, avoid calling onTransitionStart/End.
|
||||
// This is important because the stack navigator fires the completion prop when
|
||||
// the transition is ended.
|
||||
if (!animations.length) {
|
||||
this._isTransitionRunning = false;
|
||||
this.setState(nextState);
|
||||
return;
|
||||
}
|
||||
|
||||
// update scenes and play the transition
|
||||
this._isTransitionRunning = true;
|
||||
this.setState(nextState, async () => {
|
||||
|
||||
Reference in New Issue
Block a user