summaryrefslogtreecommitdiffstats
path: root/webapp/components/create_post.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-05-04 10:10:19 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-05-04 10:10:19 -0400
commit274a2a58f0cb420b1b24495dcaa7ae2d2ffd7bec (patch)
tree2296d02067c52914c0a8eac9c6b3b9abe53d4676 /webapp/components/create_post.jsx
parent1cf9432524914f538a33dad94d15251be12f7568 (diff)
downloadchat-274a2a58f0cb420b1b24495dcaa7ae2d2ffd7bec.tar.gz
chat-274a2a58f0cb420b1b24495dcaa7ae2d2ffd7bec.tar.bz2
chat-274a2a58f0cb420b1b24495dcaa7ae2d2ffd7bec.zip
Performance improvments (#2869)
Diffstat (limited to 'webapp/components/create_post.jsx')
-rw-r--r--webapp/components/create_post.jsx14
1 files changed, 2 insertions, 12 deletions
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') {