diff options
Diffstat (limited to 'web/react/components/post_list.jsx')
-rw-r--r-- | web/react/components/post_list.jsx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index 703e548fb..3e1e075bb 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -105,18 +105,18 @@ export default class PostList extends React.Component { UserStore.addStatusesChangeListener(this.onTimeChange); SocketStore.addChangeListener(this.onSocketChange); - var postHolder = $(React.findDOMNode(this.refs.postlist)); + const postHolder = $(React.findDOMNode(this.refs.postlist)); - $(window).on('resize.' + this.props.channelId, function resize() { + $(window).resize(() => { this.resize(); if (!this.scrolled) { this.scrollToBottom(); } - }.bind(this)); + }); - postHolder.on('scroll', function scroll() { - var position = postHolder.scrollTop() + postHolder.height() + 14; - var bottom = postHolder[0].scrollHeight; + postHolder.on('scroll', () => { + const position = postHolder.scrollTop() + postHolder.height() + 14; + const bottom = postHolder[0].scrollHeight; if (position >= bottom) { this.scrolled = false; @@ -128,7 +128,7 @@ export default class PostList extends React.Component { this.userHasSeenNew = true; } this.isUserScroll = true; - }.bind(this)); + }); $('.post-list__content div .post').removeClass('post--last'); $('.post-list__content div:last-child .post').addClass('post--last'); @@ -146,7 +146,7 @@ export default class PostList extends React.Component { UserStore.removeStatusesChangeListener(this.onTimeChange); SocketStore.removeChangeListener(this.onSocketChange); $('body').off('click.userpopover'); - $(window).off('resize.' + this.props.channelId); + $(window).off('resize'); var postHolder = $(React.findDOMNode(this.refs.postlist)); postHolder.off('scroll'); } @@ -326,8 +326,8 @@ export default class PostList extends React.Component { <strong><UserProfile userId={teammate.id} /></strong> </div> <p className='channel-intro-text'> - {'This is the start of your private message history with ' + teammateName + '.'}<br/> - {'Private messages and files shared here are not shown to people outside this area.'} + {'This is the start of your direct message history with ' + teammateName + '.'}<br/> + {'Direct messages and files shared here are not shown to people outside this area.'} </p> <a className='intro-links' @@ -346,7 +346,7 @@ export default class PostList extends React.Component { return ( <div className='channel-intro'> - <p className='channel-intro-text'>{'This is the start of your private message history with this teammate. Private messages and files shared here are not shown to people outside this area.'}</p> + <p className='channel-intro-text'>{'This is the start of your direct message history with this teammate. Direct messages and files shared here are not shown to people outside this area.'}</p> </div> ); } |