|
|
@ -472,10 +472,12 @@ export function reducer(
|
|
|
|
if (action.type === 'CONVERSATION_REMOVED') {
|
|
|
|
if (action.type === 'CONVERSATION_REMOVED') {
|
|
|
|
const { payload } = action;
|
|
|
|
const { payload } = action;
|
|
|
|
const { id } = payload;
|
|
|
|
const { id } = payload;
|
|
|
|
const { conversationLookup } = state;
|
|
|
|
const { conversationLookup, selectedConversation } = state;
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
...state,
|
|
|
|
conversationLookup: omit(conversationLookup, [id]),
|
|
|
|
conversationLookup: omit(conversationLookup, [id]),
|
|
|
|
|
|
|
|
selectedConversation:
|
|
|
|
|
|
|
|
selectedConversation === id ? undefined : selectedConversation,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (action.type === 'CONVERSATIONS_REMOVE_ALL') {
|
|
|
|
if (action.type === 'CONVERSATIONS_REMOVE_ALL') {
|
|
|
|