Completely remove deduping of attachments at addition stage.

pull/2681/head
Ian Macdonald 2 years ago
parent 34a8c1a8a5
commit 505007f1be
No known key found for this signature in database
GPG Key ID: AE4C20556BA626FA

@ -37,12 +37,8 @@ const stagedAttachmentsSlice = createSlice({
}
const allAttachments = _.concat(currentStagedAttachments, newAttachments);
const pastedAttachments = allAttachments.filter(m => m.fileName === 'image.png');
const allAttachmentsExceptPasted = allAttachments.filter(m => m.fileName !== 'image.png');
const uniqAttachments = _.uniqBy(allAttachmentsExceptPasted, m => m.fileName);
const finalAttachments = _.concat(uniqAttachments, pastedAttachments);
state.stagedAttachments[conversationKey] = finalAttachments;
state.stagedAttachments[conversationKey] = allAttachments;
return state;
},
removeAllStagedAttachmentsInConversation(

Loading…
Cancel
Save