[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:
Eric Vicenti 2015-05-19 18:45:08 -07:00
Родитель 11b515b1b0
Коммит 97137e8bcc
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -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();
},