summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-11-06 11:52:53 -0800
committerCorey Hulen <corey@hulen.com>2015-11-06 11:52:53 -0800
commitcfd2b3cacef9454ba16e33d141432e8cdb8cbf8b (patch)
tree2a701cdaf0d4a483435ed216a6a97853609a3699 /web
parent42a9c0e90bf73e48258f8288cb8bb60842e5a396 (diff)
parent4795c7c003d30ede8309d4fe647979d5606d5990 (diff)
downloadchat-cfd2b3cacef9454ba16e33d141432e8cdb8cbf8b.tar.gz
chat-cfd2b3cacef9454ba16e33d141432e8cdb8cbf8b.tar.bz2
chat-cfd2b3cacef9454ba16e33d141432e8cdb8cbf8b.zip
Merge pull request #1347 from mattermost/plt-1062
PLT-1062 Fix jumping when messages received in another channel.
Diffstat (limited to 'web')
-rw-r--r--web/react/components/posts_view_container.jsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/react/components/posts_view_container.jsx b/web/react/components/posts_view_container.jsx
index 6cdf69402..5059747bd 100644
--- a/web/react/components/posts_view_container.jsx
+++ b/web/react/components/posts_view_container.jsx
@@ -85,6 +85,13 @@ export default class PostsViewContainer extends React.Component {
const channels = this.state.channels.slice();
const channelId = ChannelStore.getCurrentId();
+ // Has the channel really changed?
+ if (channelId === channels[this.state.currentChannelIndex]) {
+ // Dirty hack
+ this.forceUpdate();
+ return;
+ }
+
PostStore.clearUnseenDeletedPosts(channelId);
let lastViewed = Number.MAX_VALUE;