diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-10-01 04:54:17 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-10-03 13:19:03 +0200 |
commit | bc4313369fb1ca6eae94954029901593345303b7 (patch) | |
tree | 86505916e655f90ac541a781f274988f7c89b6b1 /app/javascript/flavours/glitch | |
parent | 37246650d1d51c155e7cee1961a34000d2a26172 (diff) |
[Glitch] Fix delete conversation action not being reflected in web UI
Port 6faa98aee2af77466793d14a403600cc6104ba84 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r-- | app/javascript/flavours/glitch/reducers/conversations.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/reducers/conversations.js b/app/javascript/flavours/glitch/reducers/conversations.js index 8fcc2cc79..fba0308bc 100644 --- a/app/javascript/flavours/glitch/reducers/conversations.js +++ b/app/javascript/flavours/glitch/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 'flavours/glitch/actions/accounts'; import { DOMAIN_BLOCK_SUCCESS } from 'flavours/glitch/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; } |