From ff741740eebceb43b1d69b13d97ae7eed2aa32d1 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 13 Feb 2017 09:27:28 -0500 Subject: Increase performance when receiving messages (#5375) --- webapp/actions/post_actions.jsx | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'webapp/actions/post_actions.jsx') diff --git a/webapp/actions/post_actions.jsx b/webapp/actions/post_actions.jsx index 61f193b66..633a6f66a 100644 --- a/webapp/actions/post_actions.jsx +++ b/webapp/actions/post_actions.jsx @@ -5,7 +5,6 @@ import AppDispatcher from 'dispatcher/app_dispatcher.jsx'; import ChannelStore from 'stores/channel_store.jsx'; import PostStore from 'stores/post_store.jsx'; -import TeamStore from 'stores/team_store.jsx'; import UserStore from 'stores/user_store.jsx'; import {loadStatusesForChannel} from 'actions/status_actions.jsx'; @@ -18,30 +17,11 @@ const ActionTypes = Constants.ActionTypes; const Preferences = Constants.Preferences; export function handleNewPost(post, msg) { - const teamId = TeamStore.getCurrentId(); - - if (ChannelStore.getCurrentId() === post.channel_id) { - if (window.isActive) { - AsyncClient.viewChannel(); - } else { - AsyncClient.getChannel(post.channel_id); - } - } else if (msg && (teamId === msg.data.team_id || msg.data.channel_type === Constants.DM_CHANNEL)) { - if (Client.teamId) { - AsyncClient.getChannel(post.channel_id); - } - } - let websocketMessageProps = null; if (msg) { websocketMessageProps = msg.data; } - const myTeams = TeamStore.getMyTeamMembers(); - if (msg.data.team_id !== teamId && myTeams.filter((m) => m.team_id === msg.data.team_id).length) { - AsyncClient.getMyTeamsUnread(teamId); - } - if (post.root_id && PostStore.getPost(post.channel_id, post.root_id) == null) { Client.getPost( post.channel_id, -- cgit v1.2.3-1-g7c22