Fix occasional visual hiccup when posting/replying to messages (#3397)

Этот коммит содержится в:
Joram Wilander
2016-06-22 12:29:03 -04:00
коммит произвёл Christopher Speller
родитель 14510ce194
Коммит 2abc5a4a1a
2 изменённых файлов: 12 добавлений и 2 удалений

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

@@ -146,8 +146,13 @@ class CreateComment extends React.Component {
GlobalActions.emitUserCommentedEvent(post);
Client.createPost(
post,
() => {
(data) => {
PostStore.removePendingPost(post.channel_id, post.pending_post_id);
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_POST,
post: data
});
},
(err) => {
if (err.id === 'api.post.create_post.root_id.app_error') {

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

@@ -179,8 +179,13 @@ class CreatePost extends React.Component {
this.setState({messageText: '', submitting: false, postError: null, previews: [], serverError: null});
Client.createPost(post,
() => {
(data) => {
PostStore.removePendingPost(post.pending_post_id);
AppDispatcher.handleServerAction({
type: ActionTypes.RECEIVED_POST,
post: data
});
},
(err) => {
if (err.id === 'api.post.create_post.root_id.app_error') {