mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-28 05:41:58 -04:00
Merge pull request #3092 from benjiwheeler/fix-see-all-comments
fix see all comments and load more replies, by passing author username
This commit is contained in:
commit
60dea25a7e
1 changed files with 5 additions and 4 deletions
|
@ -483,11 +483,11 @@ class Preview extends React.Component {
|
|||
}
|
||||
handleLoadMore () {
|
||||
this.props.getTopLevelComments(this.state.projectId, this.props.comments.length,
|
||||
this.props.isAdmin, this.props.user && this.props.user.token);
|
||||
this.props.authorUsername, this.props.isAdmin, this.props.user && this.props.user.token);
|
||||
}
|
||||
handleLoadMoreReplies (commentId, offset) {
|
||||
this.props.getMoreReplies(this.state.projectId, commentId, offset,
|
||||
this.props.isAdmin, this.props.user && this.props.user.token
|
||||
this.props.authorUsername, this.props.isAdmin, this.props.user && this.props.user.token
|
||||
);
|
||||
}
|
||||
handleLoveToggle () {
|
||||
|
@ -578,6 +578,7 @@ class Preview extends React.Component {
|
|||
this.setState({singleCommentId: null});
|
||||
this.props.handleSeeAllComments(
|
||||
this.props.projectInfo.id,
|
||||
this.props.authorUsername,
|
||||
this.props.isAdmin,
|
||||
this.props.user.token
|
||||
);
|
||||
|
@ -961,9 +962,9 @@ const mapDispatchToProps = dispatch => ({
|
|||
event.preventDefault();
|
||||
dispatch(navigationActions.toggleLoginOpen());
|
||||
},
|
||||
handleSeeAllComments: (id, isAdmin, token) => {
|
||||
handleSeeAllComments: (id, ownerUsername, isAdmin, token) => {
|
||||
dispatch(previewActions.resetComments());
|
||||
dispatch(previewActions.getTopLevelComments(id, 0, isAdmin, token));
|
||||
dispatch(previewActions.getTopLevelComments(id, 0, ownerUsername, isAdmin, token));
|
||||
},
|
||||
handleUpdateProjectThumbnail: (id, blob) => {
|
||||
dispatch(previewActions.updateProjectThumbnail(id, blob));
|
||||
|
|
Loading…
Add table
Reference in a new issue