diff --git a/ElectronClient/app/app.js b/ElectronClient/app/app.js index 1817df52e2..4208de81c7 100644 --- a/ElectronClient/app/app.js +++ b/ElectronClient/app/app.js @@ -196,7 +196,6 @@ class Application extends BaseApplication { break; case 'NOTE_DEVTOOLS_TOGGLE': - newState = Object.assign({}, state); newState.noteDevToolsVisible = !newState.noteDevToolsVisible; break; @@ -250,6 +249,11 @@ class Application extends BaseApplication { this.updateMenuItemStates(); } + if (action.type === 'NOTE_DEVTOOLS_TOGGLE') { + const menuItem = Menu.getApplicationMenu().getMenuItemById('help:toggleDevTools'); + menuItem.checked = newState.noteDevToolsVisible; + } + return result; } @@ -913,6 +917,8 @@ class Application extends BaseApplication { type: 'separator', screens: ['Main'], }, { + id: 'help:toggleDevTools', + type: 'checkbox', label: _('Toggle development tools'), visible: true, click: () => {