diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-07-14 12:07:27 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-07-14 12:07:27 -0400 |
commit | a45dea6b06bb62b3fb953d598854c371f417082d (patch) | |
tree | cb712369087ab05c3adc41a6081b16a5e4e59eb3 /web/react/components/post_list.jsx | |
parent | 1f1ad8234aa44268ce76d24b80c86f5b009cc5e6 (diff) | |
parent | d9afa47ef803f3069427192acf839d21bb5a8d93 (diff) | |
download | chat-a45dea6b06bb62b3fb953d598854c371f417082d.tar.gz chat-a45dea6b06bb62b3fb953d598854c371f417082d.tar.bz2 chat-a45dea6b06bb62b3fb953d598854c371f417082d.zip |
Merge pull request #182 from mattermost/revert-174-MM-831-3
Revert "MM-831 Time change ping riding on the status interupt for tim…
Diffstat (limited to 'web/react/components/post_list.jsx')
-rw-r--r-- | web/react/components/post_list.jsx | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index e73bc10cc..9349d0240 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -35,8 +35,6 @@ module.exports = React.createClass({ oldScrollHeight: 0, oldZoom: 0, scrolledToNew: false, - preForcePosision: 0, - wasForced: false, componentDidMount: function() { var user = UserStore.getCurrentUser(); if (user.props && user.props.theme) { @@ -52,7 +50,6 @@ module.exports = React.createClass({ PostStore.addChangeListener(this._onChange); ChannelStore.addChangeListener(this._onChange); - UserStore.addStatusesChangeListener(this._onTimeChange); SocketStore.addChangeListener(this._onSocketChange); $(".post-list-holder-by-time").perfectScrollbar(); @@ -82,11 +79,6 @@ module.exports = React.createClass({ }); $(post_holder).scroll(function(e){ - if (self.wasForced) { - $(post_holder).scrollTop(self.preForcePosision); - $(post_holder).perfectScrollbar('update'); - self.wasForced = false; - } if (!self.preventScrollTrigger) { self.scrollPosition = $(post_holder).scrollTop() + $(post_holder).innerHeight(); } @@ -137,7 +129,6 @@ module.exports = React.createClass({ componentWillUnmount: function() { PostStore.removeChangeListener(this._onChange); ChannelStore.removeChangeListener(this._onChange); - UserStore.removeStatusesChangeListener(this._onTimeChange); SocketStore.removeChangeListener(this._onSocketChange); $('body').off('click.userpopover'); }, @@ -170,7 +161,7 @@ module.exports = React.createClass({ this.scrolledToNew = false; } this.setState(newState); - } + } }, _onSocketChange: function(msg) { if (msg.action == "posted") { @@ -234,11 +225,6 @@ module.exports = React.createClass({ AsyncClient.getProfiles(); } }, - _onTimeChange: function() { - this.wasForced = true; - this.preForcePosision = $(".post-list-holder-by-time").scrollTop(); - this.forceUpdate(); - }, getMorePosts: function(e) { e.preventDefault(); |