diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-12-01 08:49:26 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-12-01 08:49:26 -0500 |
commit | 2bfb3493f441d95b67351e03869f8454c4a3a265 (patch) | |
tree | f97e3300c5334d1c8c56de32bc8e62de656a50a5 /web/react/components | |
parent | 6e542efb8b3c0eea08129d78d610a667ac3d105e (diff) | |
parent | e430b1fd533e42d17d19f99cde1521f51fd221fe (diff) | |
download | chat-2bfb3493f441d95b67351e03869f8454c4a3a265.tar.gz chat-2bfb3493f441d95b67351e03869f8454c4a3a265.tar.bz2 chat-2bfb3493f441d95b67351e03869f8454c4a3a265.zip |
Merge pull request #1546 from mattermost/plt-1281
PLT-1281 Make sure to have latest posts for the view when switching to a channel
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/posts_view_container.jsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/react/components/posts_view_container.jsx b/web/react/components/posts_view_container.jsx index 367d3687e..6d6694fec 100644 --- a/web/react/components/posts_view_container.jsx +++ b/web/react/components/posts_view_container.jsx @@ -99,10 +99,12 @@ export default class PostsViewContainer extends React.Component { if (newIndex === -1) { newIndex = channels.length; channels.push(channelId); - postLists[newIndex] = this.getChannelPosts(channelId); atTop[newIndex] = PostStore.getVisibilityAtTop(channelId); } + // make sure we have the latest posts from the store + postLists[newIndex] = this.getChannelPosts(channelId); + this.setState({ currentChannelIndex: newIndex, currentLastViewed: lastViewed, |