From 274a2a58f0cb420b1b24495dcaa7ae2d2ffd7bec Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 4 May 2016 10:10:19 -0400 Subject: Performance improvments (#2869) --- webapp/components/create_post.jsx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'webapp/components/create_post.jsx') diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index 011e0c2b8..d173fe42b 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -12,7 +12,6 @@ import TutorialTip from './tutorial/tutorial_tip.jsx'; import AppDispatcher from '../dispatcher/app_dispatcher.jsx'; import * as GlobalActions from 'action_creators/global_actions.jsx'; import Client from 'utils/web_client.jsx'; -import * as AsyncClient from 'utils/async_client.jsx'; import * as Utils from 'utils/utils.jsx'; import ChannelStore from 'stores/channel_store.jsx'; @@ -167,21 +166,12 @@ class CreatePost extends React.Component { post.create_at = time; post.parent_id = this.state.parentId; - const channel = ChannelStore.get(this.state.channelId); - GlobalActions.emitUserPostedEvent(post); this.setState({messageText: '', submitting: false, postError: null, previews: [], serverError: null}); Client.createPost(post, - (data) => { - AsyncClient.getPosts(); - - const member = ChannelStore.getMember(channel.id); - member.msg_count = channel.total_msg_count; - member.last_viewed_at = Date.now(); - ChannelStore.setChannelMember(member); - - GlobalActions.emitPostRecievedEvent(data); + () => { + // DO nothing. Websockets will handle this. }, (err) => { if (err.id === 'api.post.create_post.root_id.app_error') { -- cgit v1.2.3-1-g7c22