diff options
Diffstat (limited to 'web/react/components/post_list.jsx')
-rw-r--r-- | web/react/components/post_list.jsx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index ad7f4a8bf..fa74d4295 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -69,6 +69,12 @@ module.exports = React.createClass({ this.oldScrollHeight = post_holder.scrollHeight; this.oldZoom = (window.outerWidth - 8) / window.innerWidth; + $('.modal').on('show.bs.modal', function () { + $('.modal-body').css('overflow-y', 'auto'); + $('.modal-body').css('max-height', $(window).height() * 0.7); + }); + + // Timeout exists for the DOM to fully render before making changes var self = this; $(window).resize(function(){ $(post_holder).perfectScrollbar('update'); @@ -140,6 +146,7 @@ module.exports = React.createClass({ UserStore.removeStatusesChangeListener(this._onTimeChange); SocketStore.removeChangeListener(this._onSocketChange); $('body').off('click.userpopover'); + $('.modal').off('show.bs.modal') }, resize: function() { var post_holder = $(".post-list-holder-by-time")[0]; @@ -197,10 +204,7 @@ 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); @@ -433,13 +437,8 @@ 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={postKey} + <Post ref={post.id} sameUser={sameUser} sameRoot={sameRoot} post={post} parentPost={parentPost} key={post.id} posts={posts} hideProfilePic={hideProfilePic} isLastComment={isLastComment} /> ); |