Authored by 于良

删除无用的代码 review by 盖剑秋

... ... @@ -106,8 +106,8 @@ class HomeContainer extends React.Component {
componentWillReceiveProps(nextProps) {
if (nextProps.showNativeTabBar) {
Actions.refresh({key: 'Home', showNativeTabBar: false});
ReactNative.NativeModules.YH_CommunityHelper.showTabBar();
Actions.refresh({key: 'Home', showNativeTabBar: false});
}
}
... ... @@ -126,7 +126,7 @@ class HomeContainer extends React.Component {
}
_onPressSection(section) {
this.props.actions.goToSection(section, this.props.navigationState.name);
this.props.actions.goToSection(section);
}
_onPressPost(url) {
... ...
... ... @@ -163,11 +163,11 @@ export function resetErrorCount() {
};
}
export function goToSection(section, previousScene) {
export function goToSection(section) {
Actions.Section();
return {
type: GO_TO_SECTION,
payload: {...section, previousScene},
payload: section,
};
}
... ...
... ... @@ -47,7 +47,6 @@ let InitialState = Record({
list: List(),
endReached: false,
})),
previousScene: '',
});
export default InitialState;
... ...
... ... @@ -120,8 +120,7 @@ export default function sectionReducer(state = initialState, action) {
case GO_TO_SECTION:
return state.set('id', action.payload.id)
.set('name', action.payload.name)
.set('previousScene', action.payload.previousScene);
.set('name', action.payload.name);
case SECTION_CLEAN:
return initialState;
... ...