fix: make onClickClose on confirmModal mandatory

pull/3025/head
Audric Ackermann 1 year ago
parent 539ac25927
commit 5b58a5194b

@ -49,7 +49,7 @@ export interface SessionConfirmDialogProps {
*/
onClickOk?: (...args: Array<any>) => Promise<void> | void;
onClickClose?: () => any;
onClickClose: () => any;
/**
* function to run on close click. Closes modal after execution by default

@ -87,6 +87,9 @@ export const OverlayMessageRequest = () => {
await forceSyncConfigurationNowIfNeeded();
},
onClickClose: () => {
window.inboxStore?.dispatch(updateConfirmModal(null));
},
})
);
}

@ -27,6 +27,9 @@ const toggleCallMediaPermissions = async (triggerUIUpdate: () => void) => {
await window.toggleCallMediaPermissionsTo(false);
triggerUIUpdate();
},
onClickClose: () => {
window.inboxStore?.dispatch(updateConfirmModal(null));
},
})
);
} else {

@ -364,6 +364,7 @@ export async function deleteMessagesByIdForEveryone(
closeDialog();
},
onClickCancel: closeDialog,
onClickClose: closeDialog,
closeAfterInput: false,
})
);

Loading…
Cancel
Save