Merge pull request #1546 from mattermost/plt-1281
PLT-1281 Make sure to have latest posts for the view when switching to a channel
Этот коммит содержится в:
@@ -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,
|
||||
|
||||
@@ -211,7 +211,7 @@ class PostStoreClass extends EventEmitter {
|
||||
postList.order = this.postsInfo[id].pendingPosts.order.concat(postList.order);
|
||||
}
|
||||
|
||||
// Add delteted posts
|
||||
// Add deleted posts
|
||||
if (this.postsInfo[id].hasOwnProperty('deletedPosts')) {
|
||||
Object.assign(postList.posts, this.postsInfo[id].deletedPosts);
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user