Showing
4 changed files
with
6 additions
and
8 deletions
@@ -106,8 +106,8 @@ class HomeContainer extends React.Component { | @@ -106,8 +106,8 @@ class HomeContainer extends React.Component { | ||
106 | 106 | ||
107 | componentWillReceiveProps(nextProps) { | 107 | componentWillReceiveProps(nextProps) { |
108 | if (nextProps.showNativeTabBar) { | 108 | if (nextProps.showNativeTabBar) { |
109 | - Actions.refresh({key: 'Home', showNativeTabBar: false}); | ||
110 | ReactNative.NativeModules.YH_CommunityHelper.showTabBar(); | 109 | ReactNative.NativeModules.YH_CommunityHelper.showTabBar(); |
110 | + Actions.refresh({key: 'Home', showNativeTabBar: false}); | ||
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
@@ -126,7 +126,7 @@ class HomeContainer extends React.Component { | @@ -126,7 +126,7 @@ class HomeContainer extends React.Component { | ||
126 | } | 126 | } |
127 | 127 | ||
128 | _onPressSection(section) { | 128 | _onPressSection(section) { |
129 | - this.props.actions.goToSection(section, this.props.navigationState.name); | 129 | + this.props.actions.goToSection(section); |
130 | } | 130 | } |
131 | 131 | ||
132 | _onPressPost(url) { | 132 | _onPressPost(url) { |
@@ -163,11 +163,11 @@ export function resetErrorCount() { | @@ -163,11 +163,11 @@ export function resetErrorCount() { | ||
163 | }; | 163 | }; |
164 | } | 164 | } |
165 | 165 | ||
166 | -export function goToSection(section, previousScene) { | 166 | +export function goToSection(section) { |
167 | Actions.Section(); | 167 | Actions.Section(); |
168 | return { | 168 | return { |
169 | type: GO_TO_SECTION, | 169 | type: GO_TO_SECTION, |
170 | - payload: {...section, previousScene}, | 170 | + payload: section, |
171 | }; | 171 | }; |
172 | } | 172 | } |
173 | 173 |
@@ -68,7 +68,7 @@ export default function sectionReducer(state = initialState, action) { | @@ -68,7 +68,7 @@ export default function sectionReducer(state = initialState, action) { | ||
68 | .set('error', action.payload); | 68 | .set('error', action.payload); |
69 | return nextState; | 69 | return nextState; |
70 | } | 70 | } |
71 | - | 71 | + |
72 | case SECTION_HOT_POST_REQUEST: { | 72 | case SECTION_HOT_POST_REQUEST: { |
73 | let nextState = state.setIn(['hot', 'isFetching'], true) | 73 | let nextState = state.setIn(['hot', 'isFetching'], true) |
74 | .setIn(['hot', 'error'], null) | 74 | .setIn(['hot', 'error'], null) |
@@ -120,8 +120,7 @@ export default function sectionReducer(state = initialState, action) { | @@ -120,8 +120,7 @@ export default function sectionReducer(state = initialState, action) { | ||
120 | 120 | ||
121 | case GO_TO_SECTION: | 121 | case GO_TO_SECTION: |
122 | return state.set('id', action.payload.id) | 122 | return state.set('id', action.payload.id) |
123 | - .set('name', action.payload.name) | ||
124 | - .set('previousScene', action.payload.previousScene); | 123 | + .set('name', action.payload.name); |
125 | 124 | ||
126 | case SECTION_CLEAN: | 125 | case SECTION_CLEAN: |
127 | return initialState; | 126 | return initialState; |
-
Please register or login to post a comment