diff --git a/src/app/window-handler.ts b/src/app/window-handler.ts index 08e8cf2a..7dfd5f4c 100644 --- a/src/app/window-handler.ts +++ b/src/app/window-handler.ts @@ -253,6 +253,7 @@ export class WindowHandler { 'enableRendererLogs', 'enableBrowserLogin', 'browserLoginAutoConnect', + 'devToolsEnabled', ]); logger.info( `window-handler: main windows initialized with following config data`, @@ -461,7 +462,6 @@ export class WindowHandler { windowHandler.switchClient(clientSwitchType); }, SHORTCUT_KEY_THROTTLE); this.mainWebContents.on('before-input-event', (event, input) => { - const { devToolsEnabled } = config.getConfigFields(['devToolsEnabled']); const windowsDevTools = input.control && input.shift && input.key.toLowerCase() === 'i'; const macDevTools = @@ -469,7 +469,10 @@ export class WindowHandler { if (input.control && input.shift && input.key.toLowerCase() === 'd') { event.preventDefault(); throttledExportLogs(); - } else if (devToolsEnabled && (windowsDevTools || macDevTools)) { + } else if ( + this.config.devToolsEnabled && + (windowsDevTools || macDevTools) + ) { event.preventDefault(); this.mainWebContents?.toggleDevTools(); }