From d293bc0b799a679cd27ed4ef6e818b0ca96998d9 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Wed, 8 Jul 2015 11:34:34 -0700 Subject: Implemented basic text formatting package using a modfied version of the marked js library. Supports *bold*, _italics_, and `code` --- web/react/components/post_list.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'web/react/components/post_list.jsx') diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index 83f806b79..12875ee90 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,12 @@ 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 != undefined) + postKey += post.lastEditDate; + var postCtl = ( - ); -- cgit v1.2.3-1-g7c22 From e02883baf2fd2a0cfc21bd557bc0ecc69afd707c Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Mon, 10 Aug 2015 16:51:59 -0700 Subject: Cosmetic refactoring of post_body.jsx --- web/react/components/post_list.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/react/components/post_list.jsx') diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index 12875ee90..ad7f4a8bf 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -434,8 +434,9 @@ module.exports = React.createClass({ var isLastComment = utils.isComment(post) && (i === 0 || posts[order[i-1]].root_id != post.root_id); var postKey = post.id; - if (post.lastEditDate != undefined) + if (post.lastEditDate) { postKey += post.lastEditDate; + } var postCtl = (