Merge delete for me/everyone into one modal

This commit is contained in:
Jamie Kyle
2023-04-10 14:38:34 -07:00
committed by GitHub
parent c956c0e025
commit 822b162136
43 changed files with 658 additions and 672 deletions

View File

@@ -1730,22 +1730,13 @@ export async function startApp(): Promise<void> {
event.preventDefault();
event.stopPropagation();
showConfirmationDialog({
dialogName: 'ConfirmDeleteForMeModal',
confirmStyle: 'negative',
title: window.i18n('icu:ConfirmDeleteForMeModal--title', {
count: messageIds.length,
}),
description: window.i18n(
'icu:ConfirmDeleteForMeModal--description',
{ count: messageIds.length }
),
okText: window.i18n('icu:ConfirmDeleteForMeModal--confirm'),
resolve: () => {
window.reduxActions.conversations.deleteMessages({
conversationId: conversation.id,
messageIds,
});
window.reduxActions.globalModals.toggleDeleteMessagesModal({
conversationId: conversation.id,
messageIds,
onDelete() {
if (selectedMessageIds != null) {
window.reduxActions.conversations.toggleSelectMode(false);
}
},
});
@@ -1771,7 +1762,12 @@ export async function startApp(): Promise<void> {
event.stopPropagation();
window.reduxActions.globalModals.toggleForwardMessagesModal(
messageIds
messageIds,
() => {
if (selectedMessageIds != null) {
window.reduxActions.conversations.toggleSelectMode(false);
}
}
);
return;