diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-07-20 17:34:25 -0400 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2016-07-20 17:34:25 -0400 |
commit | d1de8848451bad5a389ef1e16ee65551386b0327 (patch) | |
tree | 00aae2f8affad565061281445a814f2436d6a5c0 /webapp/actions/websocket_actions.jsx | |
parent | 022cb7ffa1517e7ac59a1a42e62a37b19db9f646 (diff) | |
download | chat-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/websocket_actions.jsx')
-rw-r--r-- | webapp/actions/websocket_actions.jsx | 5 |
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() { |