summaryrefslogtreecommitdiffstats
path: root/webapp/stores/post_store.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-08-30 18:54:48 -0400
committerenahum <nahumhbl@gmail.com>2016-08-30 19:54:48 -0300
commit3e14e8b5abee937b02b99f19730797cfa4390598 (patch)
tree81d1e174b2aee3cfe9bb2947af8c6e5ab339b261 /webapp/stores/post_store.jsx
parent391926e9a70cb7502bfbab7d8b6dbcb221b1a18e (diff)
downloadchat-3e14e8b5abee937b02b99f19730797cfa4390598.tar.gz
chat-3e14e8b5abee937b02b99f19730797cfa4390598.tar.bz2
chat-3e14e8b5abee937b02b99f19730797cfa4390598.zip
Remove getPosts request after deleting a post (#3905)
Diffstat (limited to 'webapp/stores/post_store.jsx')
-rw-r--r--webapp/stores/post_store.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx
index 7b3d337f3..0d838a3df 100644
--- a/webapp/stores/post_store.jsx
+++ b/webapp/stores/post_store.jsx
@@ -216,6 +216,11 @@ class PostStoreClass extends EventEmitter {
if (combinedPosts.order.indexOf(pid) === -1 && newPosts.order.indexOf(pid) !== -1) {
combinedPosts.order.push(pid);
}
+ } else if (combinedPosts.posts.hasOwnProperty(pid)) {
+ combinedPosts.posts[pid] = Object.assign({}, np, {
+ state: Constants.POST_DELETED,
+ filenames: []
+ });
}
}
}