From b79903e79caadaafcf7f9b5b69fdcbe058c17e3f Mon Sep 17 00:00:00 2001 From: Eric Vicenti Date: Tue, 19 May 2015 14:46:29 -0700 Subject: [PATCH] [ReactNative] Navigator clean scenes popped with gesture --- Libraries/CustomComponents/Navigator/Navigator.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Libraries/CustomComponents/Navigator/Navigator.js b/Libraries/CustomComponents/Navigator/Navigator.js index b8c019e32e458d..fee62c70ebe814 100644 --- a/Libraries/CustomComponents/Navigator/Navigator.js +++ b/Libraries/CustomComponents/Navigator/Navigator.js @@ -829,7 +829,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(); },