Merge pull request #2285 from ianmacd/pr23

Fix unfilled variable when user deletes messages only for himself.
pull/2291/head
Audric Ackermann 3 years ago committed by GitHub
commit ef62ffaa83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -365,13 +365,14 @@ export async function deleteMessagesById(messageIds: Array<string>, conversation
await Promise.all(messageIds.map(m => getMessageById(m, false)))
);
const messageCount = selectedMessages.length;
const moreThanOne = selectedMessages.length > 1;
window.inboxStore?.dispatch(
updateConfirmModal({
title: window.i18n('deleteJustForMe'),
message: moreThanOne
? window.i18n('deleteMessagesQuestion')
? window.i18n('deleteMessagesQuestion', [messageCount.toString()])
: window.i18n('deleteMessageQuestion'),
okText: window.i18n('delete'),
okTheme: SessionButtonColor.Danger,

Loading…
Cancel
Save