Skip to content

Commit

Permalink
[bugfix] Fix global hotkeys not working on startup (#488)
Browse files Browse the repository at this point in the history
* Simple one line fix for global hotkeys

* Clean up codebase via default values
  • Loading branch information
iiPythonx authored Feb 4, 2024
1 parent 24bf7ae commit 1fb7290
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ const createWindow = async () => {
}
});

const globalMediaKeysEnabled = store.get('global_media_hotkeys') as boolean;
const globalMediaKeysEnabled = store.get('global_media_hotkeys', true) as boolean;

if (globalMediaKeysEnabled !== false) {
if (globalMediaKeysEnabled) {
enableMediaKeys(mainWindow);
}

Expand Down Expand Up @@ -633,7 +633,7 @@ ipcMain.on(
}
}

const globalMediaKeysEnabled = store.get('global_media_hotkeys') as boolean;
const globalMediaKeysEnabled = store.get('global_media_hotkeys', true) as boolean;

if (globalMediaKeysEnabled) {
enableMediaKeys(mainWindow);
Expand Down

0 comments on commit 1fb7290

Please sign in to comment.