Properly load user statuses for posts in channel (#6907)
Этот коммит содержится в:
коммит произвёл
Saturnino Abril
родитель
0a78d58895
Коммит
dc3536a9f8
@@ -54,16 +54,9 @@ export function loadStatusesForChannelAndSidebar() {
|
|||||||
const statusesToLoad = {};
|
const statusesToLoad = {};
|
||||||
|
|
||||||
const channelId = ChannelStore.getCurrentId();
|
const channelId = ChannelStore.getCurrentId();
|
||||||
const postList = PostStore.getVisiblePosts(channelId);
|
const posts = PostStore.getVisiblePosts(channelId) || [];
|
||||||
if (postList && postList.posts) {
|
for (const post of posts) {
|
||||||
for (const pid in postList.posts) {
|
statusesToLoad[post.user_id] = true;
|
||||||
if (!postList.posts.hasOwnProperty(pid)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const post = postList.posts[pid];
|
|
||||||
statusesToLoad[post.user_id] = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const dmPrefs = PreferenceStore.getCategory(Preferences.CATEGORY_DIRECT_CHANNEL_SHOW);
|
const dmPrefs = PreferenceStore.getCategory(Preferences.CATEGORY_DIRECT_CHANNEL_SHOW);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user