Skip to content

Commit 7c31ed9

Browse files
author
aksonov
committed
onRight/rightTitle support for Actions.refresh
1 parent a5666a6 commit 7c31ed9

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

dist/Router.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,15 @@ if(tabBarIcon||icon){
103103
res.tabBarIcon=tabBarIcon||icon;
104104
}
105105

106-
if((rightButtonImage||rightTitle||params.renderRightButton)&&onRight){
106+
if(rightButtonImage||rightTitle||params.renderRightButton||onRight||navigationParams.onRight||
107+
navigationParams.rightTitle||navigationParams.rightButtonImage){
107108
res.headerRight=getValue(navigationParams.right||right||rightButton||params.renderRightButton,_extends({},
108109
navigationParams,screenProps))||(0,_NavBar.renderRightButton)(_extends({},params,navigationParams));
109110
}
110111

111-
if(leftButtonImage||backButtonImage||backTitle||leftTitle||params.renderLeftButton||leftButtonTextStyle||backButtonTextStyle||onLeft){
112+
if(leftButtonImage||backButtonImage||backTitle||leftTitle||params.renderLeftButton||leftButtonTextStyle||
113+
backButtonTextStyle||onLeft||navigationParams.leftTitle||navigationParams.onLeft||navigationParams.leftButtonImage||
114+
navigationParams.backButtonImage||navigationParams.backTitle){
112115
res.headerLeft=getValue(navigationParams.left||left||leftButton||params.renderLeftButton,_extends({},params,navigationParams,screenProps))||
113116
(0,_NavBar.renderLeftButton)(_extends({},params,navigationParams))||(init?null:(0,_NavBar.renderBackButton)(_extends({},params,navigationParams,screenProps)));
114117
}
@@ -136,15 +139,15 @@ if(!Component){
136139
return null;
137140
}
138141
return(0,_native.observer)(function(_ref3){var navigation=_ref3.navigation,props=_objectWithoutProperties(_ref3,['navigation']);
139-
return _react2.default.createElement(Component,_extends({},props,{navigation:navigation},navigation.state.params,{name:navigation.state.routeName,__source:{fileName:_jsxFileName,lineNumber:139}}));
142+
return _react2.default.createElement(Component,_extends({},props,{navigation:navigation},navigation.state.params,{name:navigation.state.routeName,__source:{fileName:_jsxFileName,lineNumber:142}}));
140143
});
141144
}
142145

143146

144147
var App=(0,_native.observer)(function(props){
145148
var AppNavigator=props.navigator;
146149
return(
147-
_react2.default.createElement(AppNavigator,{navigation:(0,_reactNavigation.addNavigationHelpers)({dispatch:_navigationStore2.default.dispatch,state:_navigationStore2.default.state}),__source:{fileName:_jsxFileName,lineNumber:147}}));
150+
_react2.default.createElement(AppNavigator,{navigation:(0,_reactNavigation.addNavigationHelpers)({dispatch:_navigationStore2.default.dispatch,state:_navigationStore2.default.state}),__source:{fileName:_jsxFileName,lineNumber:150}}));
148151

149152
});
150153

@@ -262,7 +265,7 @@ var AppNavigator=processScene(scene,props);
262265
_navigationStore2.default.router=AppNavigator.router;
263266
_navigationStore2.default.reducer=createReducer&&createReducer(props);
264267

265-
return _react2.default.createElement(App,{navigator:AppNavigator,__source:{fileName:_jsxFileName,lineNumber:265}});
268+
return _react2.default.createElement(App,{navigator:AppNavigator,__source:{fileName:_jsxFileName,lineNumber:268}});
266269
};
267270
Router.propTypes={
268271
createReducer:_propTypes2.default.func,

0 commit comments

Comments
 (0)