PLT-3221 Remove async call to get posts when creating a comment and editing a post (#3300)

PLT-3203 Commenting on the RHS while in permalink view makes the message not show up in the RHS
Этот коммит содержится в:
enahum
2016-06-09 15:28:57 -03:00
коммит произвёл Corey Hulen
родитель f1eefd99e6
Коммит 18c53e03eb
6 изменённых файлов: 33 добавлений и 26 удалений

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

@@ -5,7 +5,6 @@ import $ from 'jquery';
import ReactDOM from 'react-dom';
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
import Client from 'utils/web_client.jsx';
import ChannelStore from 'stores/channel_store.jsx';
import UserStore from 'stores/user_store.jsx';
import PostDeletedModal from './post_deleted_modal.jsx';
import PostStore from 'stores/post_store.jsx';
@@ -144,22 +143,11 @@ class CreateComment extends React.Component {
post.user_id = userId;
post.create_at = time;
PostStore.storePendingPost(post);
PostStore.storeCommentDraft(this.props.rootId, null);
GlobalActions.emitUserCommentedEvent(post);
Client.createPost(
post,
(data) => {
const channel = ChannelStore.get(this.props.channelId);
const member = ChannelStore.getMember(this.props.channelId);
member.msg_count = channel.total_msg_count;
member.last_viewed_at = Date.now();
ChannelStore.setChannelMember(member);
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_POST,
post: data
});
() => {
// DO nothing. Websockets will handle this.
},
(err) => {
if (err.id === 'api.post.create_post.root_id.app_error') {