summaryrefslogtreecommitdiffstats
path: root/webapp/actions
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-07-20 17:34:25 -0400
committerenahum <nahumhbl@gmail.com>2016-07-20 17:34:25 -0400
commitd1de8848451bad5a389ef1e16ee65551386b0327 (patch)
tree00aae2f8affad565061281445a814f2436d6a5c0 /webapp/actions
parent022cb7ffa1517e7ac59a1a42e62a37b19db9f646 (diff)
downloadchat-d1de8848451bad5a389ef1e16ee65551386b0327.tar.gz
chat-d1de8848451bad5a389ef1e16ee65551386b0327.tar.bz2
chat-d1de8848451bad5a389ef1e16ee65551386b0327.zip
Fix RHS not closing when thread is deleted by another user (#3641)
Diffstat (limited to 'webapp/actions')
-rw-r--r--webapp/actions/websocket_actions.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx
index 8285c2c93..6be7057a7 100644
--- a/webapp/actions/websocket_actions.jsx
+++ b/webapp/actions/websocket_actions.jsx
@@ -159,6 +159,11 @@ function handlePostEditEvent(msg) {
function handlePostDeleteEvent(msg) {
const post = JSON.parse(msg.data.post);
GlobalActions.emitPostDeletedEvent(post);
+
+ const selectedPostId = PostStore.getSelectedPostId();
+ if (selectedPostId === post.id) {
+ GlobalActions.emitCloseRightHandSide();
+ }
}
function handleNewUserEvent() {