summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_list.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/post_list.jsx')
-rw-r--r--web/react/components/post_list.jsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index 83f806b79..ad7f4a8bf 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -197,7 +197,10 @@ module.exports = React.createClass({
var post = post_list.posts[msg.props.post_id];
post.message = msg.props.message;
+ post.lastEditDate = Date.now();
+
post_list.posts[post.id] = post;
+
this.setState({ post_list: post_list });
PostStore.storePosts(msg.channel_id, post_list);
@@ -430,8 +433,13 @@ module.exports = React.createClass({
// it is the last comment if it is last post in the channel or the next post has a different root post
var isLastComment = utils.isComment(post) && (i === 0 || posts[order[i-1]].root_id != post.root_id);
+ var postKey = post.id;
+ if (post.lastEditDate) {
+ postKey += post.lastEditDate;
+ }
+
var postCtl = (
- <Post ref={post.id} sameUser={sameUser} sameRoot={sameRoot} post={post} parentPost={parentPost} key={post.id}
+ <Post ref={post.id} sameUser={sameUser} sameRoot={sameRoot} post={post} parentPost={parentPost} key={postKey}
posts={posts} hideProfilePic={hideProfilePic} isLastComment={isLastComment}
/>
);