update electron & remote module

This commit is contained in:
Araxeus
2021-12-13 20:10:36 +02:00
parent e1e9748002
commit 4fd683ed23
8 changed files with 64 additions and 36 deletions

View File

@ -1,4 +1,5 @@
const { ipcRenderer, remote } = require("electron");
const { ipcRenderer } = require("electron");
const { globalShortcut } = require('@electron/remote');
const { setOptions } = require("../../config/plugins");
@ -202,10 +203,10 @@ function setTooltip(volume) {
function setupGlobalShortcuts(options) {
if (options.globalShortcuts.volumeUp) {
remote.globalShortcut.register((options.globalShortcuts.volumeUp), () => changeVolume(true, options));
globalShortcut.register((options.globalShortcuts.volumeUp), () => changeVolume(true, options));
}
if (options.globalShortcuts.volumeDown) {
remote.globalShortcut.register((options.globalShortcuts.volumeDown), () => changeVolume(false, options));
globalShortcut.register((options.globalShortcuts.volumeDown), () => changeVolume(false, options));
}
}