Remove local messages when closing dm tab, avoid sending open_dm if already open

This commit is contained in:
Ken-Håvard Lieng 2020-05-08 02:56:54 +02:00
parent 2a72b198e3
commit 08ffc79a65
4 changed files with 119 additions and 85 deletions

View file

@ -140,6 +140,10 @@ export default createReducer(
channels.forEach(channel => delete state[server][channel]);
},
[actions.CLOSE_PRIVATE_CHAT](state, { server, nick }) {
delete state[server][nick];
},
[actions.socket.CHANNEL_FORWARD](state, { server, old }) {
if (state[server]) {
delete state[server][old];