From 3e14e8b5abee937b02b99f19730797cfa4390598 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 30 Aug 2016 18:54:48 -0400 Subject: Remove getPosts request after deleting a post (#3905) --- webapp/components/delete_post_modal.jsx | 1 - webapp/components/post_view/components/post_info.jsx | 5 ++++- webapp/components/rhs_comment.jsx | 5 ++++- webapp/stores/post_store.jsx | 5 +++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/webapp/components/delete_post_modal.jsx b/webapp/components/delete_post_modal.jsx index 6563e3ee8..5f21ea3bc 100644 --- a/webapp/components/delete_post_modal.jsx +++ b/webapp/components/delete_post_modal.jsx @@ -55,7 +55,6 @@ export default class DeletePostModal extends React.Component { this.state.post.id, () => { PostStore.deletePost(this.state.post); - AsyncClient.getPosts(this.state.post.channel_id); if (this.state.post.id === PostStore.getSelectedPostId()) { AppDispatcher.handleServerAction({ diff --git a/webapp/components/post_view/components/post_info.jsx b/webapp/components/post_view/components/post_info.jsx index e95afe3ed..81e6a1fc2 100644 --- a/webapp/components/post_view/components/post_info.jsx +++ b/webapp/components/post_view/components/post_info.jsx @@ -147,7 +147,10 @@ export default class PostInfo extends React.Component { GlobalActions.showDeletePostModal(post, dataComments)} + onClick={(e) => { + e.preventDefault(); + GlobalActions.showDeletePostModal(post, dataComments); + }} > GlobalActions.showDeletePostModal(post, 0)} + onClick={(e) => { + e.preventDefault(); + GlobalActions.showDeletePostModal(post, 0); + }} >