mirror of
https://github.com/vector-im/element-desktop.git
synced 2024-09-17 01:35:12 +00:00
make shortcut pressed variable more explanatory
This commit is contained in:
parent
84990559ec
commit
5fc871492e
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue