Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
YH_RNComponent
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
于良
9 years ago
Commit
692c6e93bdc53e3dd24d94812f60b70c33be8083
1 parent
47e1c580
删除无用的代码 review by 盖剑秋
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
8 deletions
js/community/containers/HomeContainer.js
js/community/reducers/home/homeActions.js
js/community/reducers/section/sectionInitialState.js
js/community/reducers/section/sectionReducer.js
js/community/containers/HomeContainer.js
View file @
692c6e9
...
...
@@ -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
)
{
...
...
js/community/reducers/home/homeActions.js
View file @
692c6e9
...
...
@@ -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
,
};
}
...
...
js/community/reducers/section/sectionInitialState.js
View file @
692c6e9
...
...
@@ -47,7 +47,6 @@ let InitialState = Record({
list
:
List
(),
endReached
:
false
,
})),
previousScene
:
''
,
});
export
default
InitialState
;
...
...
js/community/reducers/section/sectionReducer.js
View file @
692c6e9
...
...
@@ -68,7 +68,7 @@ export default function sectionReducer(state = initialState, action) {
.
set
(
'error'
,
action
.
payload
);
return
nextState
;
}
case
SECTION_HOT_POST_REQUEST
:
{
let
nextState
=
state
.
setIn
([
'hot'
,
'isFetching'
],
true
)
.
setIn
([
'hot'
,
'error'
],
null
)
...
...
@@ -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
;
...
...
Please
register
or
login
to post a comment