Fix unfilled variable when user deletes messages only for himself.

pull/2285/head
Ian Macdonald 3 years ago
parent 6e2b2d44f8
commit e0e8f8f444
No known key found for this signature in database
GPG Key ID: AE4C20556BA626FA

@ -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