mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-24 14:56:27 +00:00
[Glitch] Fix delete conversation action not being reflected in web UI
Port 6faa98aee2
to glitch-soc
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
parent
37246650d1
commit
bc4313369f
|
@ -7,6 +7,7 @@ import {
|
||||||
CONVERSATIONS_FETCH_FAIL,
|
CONVERSATIONS_FETCH_FAIL,
|
||||||
CONVERSATIONS_UPDATE,
|
CONVERSATIONS_UPDATE,
|
||||||
CONVERSATIONS_READ,
|
CONVERSATIONS_READ,
|
||||||
|
CONVERSATIONS_DELETE_SUCCESS,
|
||||||
} from '../actions/conversations';
|
} from '../actions/conversations';
|
||||||
import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'flavours/glitch/actions/accounts';
|
import { ACCOUNT_BLOCK_SUCCESS, ACCOUNT_MUTE_SUCCESS } from 'flavours/glitch/actions/accounts';
|
||||||
import { DOMAIN_BLOCK_SUCCESS } from 'flavours/glitch/actions/domain_blocks';
|
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]);
|
return filterConversations(state, [action.relationship.id]);
|
||||||
case DOMAIN_BLOCK_SUCCESS:
|
case DOMAIN_BLOCK_SUCCESS:
|
||||||
return filterConversations(state, action.accounts);
|
return filterConversations(state, action.accounts);
|
||||||
|
case CONVERSATIONS_DELETE_SUCCESS:
|
||||||
|
return state.update('items', list => list.filterNot(item => item.get('id') === action.id));
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue