mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-19 07:54:59 +01:00
make shortcut pressed variable more explanatory
This commit is contained in:
parent
84990559ec
commit
5fc871492e
@ -264,9 +264,9 @@ const exitShortcuts = [
|
|||||||
|
|
||||||
const warnBeforeExit = (event, input) => {
|
const warnBeforeExit = (event, input) => {
|
||||||
const shouldWarnBeforeExit = store.get('warnBeforeExit', true);
|
const shouldWarnBeforeExit = store.get('warnBeforeExit', true);
|
||||||
const shortcutPressed = exitShortcuts.some(shortcutFn => shortcutFn(input, process.platform));
|
const exitShortcutPressed = exitShortcuts.some(shortcutFn => shortcutFn(input, process.platform));
|
||||||
|
|
||||||
if (shouldWarnBeforeExit && shortcutPressed) {
|
if (shouldWarnBeforeExit && exitShortcutPressed) {
|
||||||
const shouldCancelCloseRequest = dialog.showMessageBoxSync(mainWindow, {
|
const shouldCancelCloseRequest = dialog.showMessageBoxSync(mainWindow, {
|
||||||
type: "question",
|
type: "question",
|
||||||
buttons: ["Cancel", "Close Element"],
|
buttons: ["Cancel", "Close Element"],
|
||||||
|
Loading…
Reference in New Issue
Block a user