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
2cb2768616c16357c9499f091f0c31c28ec9ad04
1 parent
198f3dd1
Fix ui bug on post detail. reviewed by Redding.
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
js/community/containers/SubjectPostContainer.js
js/community/reducers/subject/subjectPostInitialState.js
js/community/reducers/subject/subjectPostReducer.js
js/community/containers/SubjectPostContainer.js
View file @
2cb2768
...
...
@@ -226,10 +226,11 @@ class SubjectPostContainer extends Component {
};
return
(
<
View
style
=
{
styles
.
container
}
>
<
SubjectPost
{
item
.
isContentFetching
?
null
:
<
SubjectPost
dataBlob
=
{
dataBlob
}
onEndReached
=
{
this
.
onEndReached
}
endReached
=
{
item
.
c
urrentPage
>=
item
.
totalPages
}
endReached
=
{
item
.
c
ommentReachEnd
}
isFetching
=
{
item
.
isCommentsFetching
}
assetsSelected
=
{
this
.
assetsSelected
}
assets
=
{
item
.
assets
.
toJS
()}
...
...
@@ -248,6 +249,8 @@ class SubjectPostContainer extends Component {
onPressLargeImage
=
{
this
.
onPressLargeImage
}
onPressDeleteComment
=
{
this
.
onPressDeleteComment
}
/
>
}
<
/View
>
);
}
...
...
js/community/reducers/subject/subjectPostInitialState.js
View file @
2cb2768
...
...
@@ -10,7 +10,7 @@
import
Immutable
,
{
List
,
Record
}
from
'immutable'
;
let
item
=
new
(
Record
({
isContentFetching
:
fals
e
,
isContentFetching
:
tru
e
,
contentError
:
null
,
isCommentsFetching
:
false
,
commentsError
:
null
,
...
...
@@ -60,6 +60,7 @@ let item = new (Record({
inLikeAction
:
false
,
largeImages
:[],
shareUrl
:
''
,
commentReachEnd
:
false
,
}));
let
InitialState
=
Record
({
...
...
js/community/reducers/subject/subjectPostReducer.js
View file @
2cb2768
...
...
@@ -164,11 +164,13 @@ export default function postingReducer(state = initialState, action) {
let
nextData
=
[...
existedAry
,...
list
];
let
page
=
item
.
currentPage
;
page
++
;
let
endReached
=
list
.
length
<
10
;
item
=
item
.
set
(
'commentList'
,
Immutable
.
fromJS
(
nextData
))
.
set
(
'lastedTime'
,
lastedTime
)
.
set
(
'totalPages'
,
totalPages
)
.
set
(
'currentPage'
,
page
)
.
set
(
'commentCount'
,
total
);
.
set
(
'commentCount'
,
total
)
.
set
(
'commentReachEnd'
,
endReached
);
let
nextState
=
state
.
setIn
([
'items'
,
sid
],
item
);
return
nextState
;
}
...
...
Please
register
or
login
to post a comment