mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00:00
[ReactNative] Navigator clean scenes popped with gesture
Summary: Fixes https://github.com/facebook/react-native/issues/1252 Scenes dismissed/popped via a gesture were not being removed. This is probably a regression from an earlier refactor. Test plan: log statements after scene focusing now reports that `navigator.getCurrentRoutes().length` lowers after gesture. Tested on UIExplorer Navigator example Closes https://github.com/facebook/react-native/pull/1346 Github Author: Eric Vicenti <evv@fb.com> @public Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
parent
11b515b1b0
commit
97137e8bcc
@ -827,7 +827,16 @@ var Navigator = React.createClass({
|
||||
}
|
||||
} else {
|
||||
// The gesture has enough velocity to complete, so we transition to the gesture's destination
|
||||
this._transitionTo(destIndex, transitionVelocity);
|
||||
this._transitionTo(
|
||||
destIndex,
|
||||
transitionVelocity,
|
||||
null,
|
||||
() => {
|
||||
if (releaseGestureAction === 'pop') {
|
||||
this._cleanScenesPastIndex(destIndex);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
this._detachGesture();
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user