[ReactNative] Fix Navigator empty scene issue
Summary: In some situations, when quickly swiping back to a scene we are transitioning from, the scene is blank/missing. This is fixed by adding a check for the active gesture when we hide the scenes. @public Test Plan: Can no longer reproduce on simulator when quickly swiping back to the scene we are transitioning from
This commit is contained in:
parent
ef339250b5
commit
02d875869a
|
@ -659,11 +659,17 @@ var Navigator = React.createClass({
|
|||
},
|
||||
|
||||
/**
|
||||
* Hides scenes that we are not currently on or transitioning from
|
||||
* Hides all scenes that we are not currently on, gesturing to, or transitioning from
|
||||
*/
|
||||
_hideScenes: function() {
|
||||
var gesturingToIndex = null;
|
||||
if (this.state.activeGesture) {
|
||||
gesturingToIndex = this.state.presentedIndex + this._deltaForGestureAction(this.state.activeGesture);
|
||||
}
|
||||
for (var i = 0; i < this.state.routeStack.length; i++) {
|
||||
if (i === this.state.presentedIndex || i === this.state.transitionFromIndex) {
|
||||
if (i === this.state.presentedIndex ||
|
||||
i === this.state.transitionFromIndex ||
|
||||
i === gesturingToIndex) {
|
||||
continue;
|
||||
}
|
||||
this._disableScene(i);
|
||||
|
|
Loading…
Reference in New Issue