diff --git a/webapp/components/post_view/components/post.jsx b/webapp/components/post_view/components/post.jsx
index 8ca84aa205..1959d5cad3 100644
--- a/webapp/components/post_view/components/post.jsx
+++ b/webapp/components/post_view/components/post.jsx
@@ -22,7 +22,7 @@ export default class Post extends Component {
sameUser: PropTypes.bool,
sameRoot: PropTypes.bool,
hideProfilePic: PropTypes.bool,
- isLastPost: PropTypes.bool,
+ lastPostCount: PropTypes.number,
isLastComment: PropTypes.bool,
shouldHighlight: PropTypes.bool,
displayNameType: PropTypes.string,
@@ -137,6 +137,10 @@ export default class Post extends Component {
return true;
}
+ if (nextProps.lastPostCount !== this.props.lastPostCount) {
+ return true;
+ }
+
return false;
}
@@ -306,7 +310,7 @@ export default class Post extends Component {
post={post}
currentUser={this.props.currentUser}
sameRoot={this.props.sameRoot}
- isLastPost={this.props.isLastPost}
+ lastPostCount={this.props.lastPostCount}
parentPost={parentPost}
handleCommentClick={this.handleCommentClick}
compactDisplay={this.props.compactDisplay}
diff --git a/webapp/components/post_view/components/post_body.jsx b/webapp/components/post_view/components/post_body.jsx
index 108605eeae..2ad9f96d16 100644
--- a/webapp/components/post_view/components/post_body.jsx
+++ b/webapp/components/post_view/components/post_body.jsx
@@ -51,6 +51,10 @@ export default class PostBody extends React.Component {
return true;
}
+ if (nextProps.lastPostCount !== this.props.lastPostCount) {
+ return true;
+ }
+
return false;
}
@@ -164,7 +168,7 @@ export default class PostBody extends React.Component {
>
{loading}
@@ -208,7 +212,7 @@ PostBody.propTypes = {
currentUser: React.PropTypes.object.isRequired,
parentPost: React.PropTypes.object,
retryPost: React.PropTypes.func,
- isLastPost: React.PropTypes.bool,
+ lastPostCount: React.PropTypes.number,
handleCommentClick: React.PropTypes.func.isRequired,
compactDisplay: React.PropTypes.bool,
previewCollapsed: React.PropTypes.string,
diff --git a/webapp/components/post_view/components/post_list.jsx b/webapp/components/post_view/components/post_list.jsx
index 483ff78c89..f233884acc 100644
--- a/webapp/components/post_view/components/post_list.jsx
+++ b/webapp/components/post_view/components/post_list.jsx
@@ -339,7 +339,7 @@ export default class PostList extends React.Component {
= 0 && i < Constants.TEST_ID_COUNT) ? i : -1}
sameUser={sameUser}
sameRoot={sameRoot}
post={post}
diff --git a/webapp/components/post_view/components/post_message_container.jsx b/webapp/components/post_view/components/post_message_container.jsx
index 5d324ba46c..4cb3cb76c8 100644
--- a/webapp/components/post_view/components/post_message_container.jsx
+++ b/webapp/components/post_view/components/post_message_container.jsx
@@ -16,7 +16,7 @@ export default class PostMessageContainer extends React.Component {
static propTypes = {
post: React.PropTypes.object.isRequired,
options: React.PropTypes.object,
- isLastPost: React.PropTypes.bool
+ lastPostCount: React.PropTypes.number
};
static defaultProps = {
@@ -91,7 +91,7 @@ export default class PostMessageContainer extends React.Component {
{renderedSystemMessage};
}
+ let postId = null;
+ if (this.props.lastPostCount >= 0) {
+ postId = Utils.createSafeId('lastPostMessageText' + this.props.lastPostCount);
+ }
+
return (