Merge pull request #1546 from mattermost/plt-1281

PLT-1281 Make sure to have latest posts for the view when switching to a channel
Этот коммит содержится в:
Christopher Speller
2015-12-01 08:49:26 -05:00
родитель 6e542efb8b e430b1fd53
Коммит 2bfb3493f4
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@@ -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,