Skip to content

Commit 55ff26d

Browse files
author
aksonov
committed
Fix minor issues, bump new version
1 parent 466064f commit 55ff26d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"react-native": "0.44.0",
1616
"react-native-button": "^2.0.0",
1717
"react-native-message-bar": "^1.6.0",
18-
"react-native-router-flux": "4.0.0-beta.16",
18+
"react-native-router-flux": "4.0.0-beta.17",
1919
"react-navigation": "^1.0.0-beta.11"
2020
},
2121
"devDependencies": {

dist/navigationStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ _this.dispatch(_reactNavigation.NavigationActions.reset({key:null,index:0,action
492492
routeName:routeName,
493493
params:params})]}));
494494

495-
};}_createClass(NavigationStore,[{key:'state',get:function get(){var scene=this.currentScene;var params=this.currentParams;return this._state;}}]);return NavigationStore;}(),(_descriptor=_applyDecoratedDescriptor(_class.prototype,'currentScene',[_mobx.observable],{enumerable:true,initializer:function initializer(){return'';}}),_descriptor2=_applyDecoratedDescriptor(_class.prototype,'prevScene',[_mobx.observable],{enumerable:true,initializer:function initializer(){return'';}}),_descriptor3=_applyDecoratedDescriptor(_class.prototype,'currentParams',[_mobx.observable],{enumerable:true,initializer:null}),_descriptor4=_applyDecoratedDescriptor(_class.prototype,'setState',[_mobx.action],{enumerable:true,initializer:function initializer(){var _this2=this;return function _callee(newState){var state,currentScene,prevScene,exitHandler,res,handler,_success,_failure,params,_res;return regeneratorRuntime.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if(newState){_context.next=2;break;}return _context.abrupt('return');case 2:state=(0,_State.getActiveState)(newState);currentScene=_this2.currentScene;prevScene=_this2.prevScene;_this2._state=newState;_this2.currentScene=state.routeName;_this2.currentParams=state.params;if(!(currentScene!==_this2.currentScene&&_this2.currentScene!=='DrawerOpen'&&_this2.currentScene!=='DrawerClose'&&prevScene!=='DrawerOpen')){_context.next=30;break;}_this2.dispatch({type:ActionConst.BLUR,routeName:prevScene});exitHandler=_this2[prevScene+_Util.OnExit];if(exitHandler){try{res=exitHandler();if(res instanceof Promise){res.then(defaultSuccess,defaultFailure);}}catch(e){console.error('Error during onExit handler:',e);}}_this2.dispatch({type:ActionConst.FOCUS,routeName:_this2.currentScene,params:_this2.currentParams});if(!_this2.states[_this2.currentScene]){_context.next=29;break;}handler=_this2[_this2.currentScene+_Util.OnEnter];_success=_this2.states[_this2.currentScene].success||defaultSuccess;_failure=_this2.states[_this2.currentScene].failure||defaultFailure;if(!handler){_context.next=29;break;}_context.prev=18;params=(0,_State.getActiveState)(_this2._state).params;_context.next=22;return regeneratorRuntime.awrap(handler(params));case 22:_res=_context.sent;if(_res){_success(_res);}else{_failure();}_context.next=29;break;case 26:_context.prev=26;_context.t0=_context['catch'](18);_failure({error:_context.t0});case 29:_this2.prevScene=currentScene;case 30:case'end':return _context.stop();}}},null,_this2,[[18,26]]);};}})),_class);exports.default=
495+
};}_createClass(NavigationStore,[{key:'state',get:function get(){var scene=this.currentScene;var params=this.currentParams;return this._state;}}]);return NavigationStore;}(),(_descriptor=_applyDecoratedDescriptor(_class.prototype,'currentScene',[_mobx.observable],{enumerable:true,initializer:function initializer(){return'';}}),_descriptor2=_applyDecoratedDescriptor(_class.prototype,'prevScene',[_mobx.observable],{enumerable:true,initializer:function initializer(){return'';}}),_descriptor3=_applyDecoratedDescriptor(_class.prototype,'currentParams',[_mobx.observable],{enumerable:true,initializer:null}),_descriptor4=_applyDecoratedDescriptor(_class.prototype,'setState',[_mobx.action],{enumerable:true,initializer:function initializer(){var _this2=this;return function _callee(newState){var state,currentScene,prevScene,exitHandler,res,handler,_success,_failure,params,_res;return regeneratorRuntime.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if(newState){_context.next=2;break;}return _context.abrupt('return');case 2:state=(0,_State.getActiveState)(newState);currentScene=_this2.currentScene;prevScene=_this2.prevScene;_this2._state=newState;_this2.currentScene=state.routeName;_this2.currentParams=state.params;if(!(currentScene!==_this2.currentScene)){_context.next=29;break;}_this2.dispatch({type:ActionConst.BLUR,routeName:prevScene});exitHandler=_this2[prevScene+_Util.OnExit];if(exitHandler){try{res=exitHandler();if(res instanceof Promise){res.then(defaultSuccess,defaultFailure);}}catch(e){console.error('Error during onExit handler:',e);}}_this2.dispatch({type:ActionConst.FOCUS,routeName:_this2.currentScene,params:_this2.currentParams});if(!_this2.states[_this2.currentScene]){_context.next=29;break;}handler=_this2[_this2.currentScene+_Util.OnEnter];_success=_this2.states[_this2.currentScene].success||defaultSuccess;_failure=_this2.states[_this2.currentScene].failure||defaultFailure;if(!handler){_context.next=29;break;}_context.prev=18;params=(0,_State.getActiveState)(_this2._state).params;_context.next=22;return regeneratorRuntime.awrap(handler(params));case 22:_res=_context.sent;if(_res){_success(_res);}else{_failure();}_context.next=29;break;case 26:_context.prev=26;_context.t0=_context['catch'](18);_failure({error:_context.t0});case 29:_this2.prevScene=currentScene;case 30:case'end':return _context.stop();}}},null,_this2,[[18,26]]);};}})),_class);exports.default=
496496

497497

498498

src/navigationStore.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class NavigationStore {
388388
this.currentScene = state.routeName;
389389
this.currentParams = state.params;
390390

391-
if (currentScene !== this.currentScene && this.currentScene !== 'DrawerOpen' && this.currentScene !== 'DrawerClose' && prevScene !== 'DrawerOpen') {
391+
if (currentScene !== this.currentScene) {
392392
this.dispatch({ type: ActionConst.BLUR, routeName: prevScene });
393393

394394
// call onExit handler
@@ -425,8 +425,8 @@ class NavigationStore {
425425
}
426426
}
427427
}
428-
this.prevScene = currentScene;
429428
}
429+
this.prevScene = currentScene;
430430
};
431431

432432
execute = (actionType, routeName, ...params) => {

0 commit comments

Comments
 (0)