Properly load user statuses for posts in channel (#6907)

Этот коммит содержится в:
Joram Wilander
2017-07-12 09:14:32 -04:00
коммит произвёл Saturnino Abril
родитель 0a78d58895
Коммит dc3536a9f8

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

@@ -54,16 +54,9 @@ export function loadStatusesForChannelAndSidebar() {
const statusesToLoad = {};
const channelId = ChannelStore.getCurrentId();
const postList = PostStore.getVisiblePosts(channelId);
if (postList && postList.posts) {
for (const pid in postList.posts) {
if (!postList.posts.hasOwnProperty(pid)) {
continue;
}
const post = postList.posts[pid];
statusesToLoad[post.user_id] = true;
}
const posts = PostStore.getVisiblePosts(channelId) || [];
for (const post of posts) {
statusesToLoad[post.user_id] = true;
}
const dmPrefs = PreferenceStore.getCategory(Preferences.CATEGORY_DIRECT_CHANNEL_SHOW);