about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-10-01 04:54:17 +0200
committerGitHub <noreply@github.com>2019-10-01 04:54:17 +0200
commit6faa98aee2af77466793d14a403600cc6104ba84 (patch)
treee27bd4cbd9cd9fcd33b5707fd19c4a22df29953f /app
parent9ba40a6bfdb65f6e48eb7de07b2d55314c54fa83 (diff)
Fix delete conversation action not being reflected in web UI (#12030)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/reducers/conversations.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/conversations.js b/app/javascript/mastodon/reducers/conversations.js
index 390658239..975418eda 100644
--- a/app/javascript/mastodon/reducers/conversations.js
+++ b/app/javascript/mastodon/reducers/conversations.js
@@ -7,6 +7,7 @@ import {
   CONVERSATIONS_FETCH_FAIL,
   CONVERSATIONS_UPDATE,
   CONVERSATIONS_READ,
+  CONVERSATIONS_DELETE_SUCCESS,
 } from '../actions/conversations';
 import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'mastodon/actions/accounts';
 import { DOMAIN_BLOCK_SUCCESS } from 'mastodon/actions/domain_blocks';
@@ -107,6 +108,8 @@ export default function conversations(state = initialState, action) {
     return filterConversations(state, [action.relationship.id]);
   case DOMAIN_BLOCK_SUCCESS:
     return filterConversations(state, action.accounts);
+  case CONVERSATIONS_DELETE_SUCCESS:
+    return state.update('items', list => list.filterNot(item => item.get('id') === action.id));
   default:
     return state;
   }