Ask for confirmation when closing app during call
This commit is contained in:
parent
c772f2abc5
commit
93c019dc30
4 changed files with 129 additions and 0 deletions
|
@ -388,6 +388,19 @@ ipc.on('get-ready-for-shutdown', async () => {
|
|||
}
|
||||
});
|
||||
|
||||
ipc.on('maybe-request-close-confirmation', async () => {
|
||||
const { maybeRequestCloseConfirmation } = window.Events;
|
||||
if (!maybeRequestCloseConfirmation) {
|
||||
ipc.send('received-close-confirmation', true);
|
||||
return;
|
||||
}
|
||||
|
||||
log.info('Requesting close confirmation.');
|
||||
ipc.send('requested-close-confirmation');
|
||||
const result = await maybeRequestCloseConfirmation();
|
||||
ipc.send('received-close-confirmation', result);
|
||||
});
|
||||
|
||||
ipc.on('show-release-notes', () => {
|
||||
const { showReleaseNotes } = window.Events;
|
||||
if (showReleaseNotes) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue