diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 93458df..c0971ad 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -215,10 +215,8 @@ function initWindowBoundsListeners(win: BrowserWindow) { function initSettingsListeners(win: BrowserWindow) { Settings.addChangeListener("tray", enable => { - if (enable) - initTray(win); - else - tray?.destroy(); + if (enable) initTray(win); + else tray?.destroy(); }); Settings.addChangeListener("disableMinSize", disable => { if (disable) { diff --git a/src/renderer/components/Settings.tsx b/src/renderer/components/Settings.tsx index 995100a..6e5760e 100644 --- a/src/renderer/components/Settings.tsx +++ b/src/renderer/components/Settings.tsx @@ -22,18 +22,13 @@ export default function SettingsUi() { } = Common; const switches: [keyof typeof Settings, string, string, boolean?, (() => boolean)?][] = [ - [ - "tray", - "Tray Icon", - "Add a tray icon for Vencord Desktop", - true - ], + ["tray", "Tray Icon", "Add a tray icon for Vencord Desktop", true], [ "minimizeToTray", "Minimize to tray", "Hitting X will make Vencord Desktop minimize to the tray instead of closing", true, - () => Settings["tray"] ?? true + () => Settings.tray ?? true ], [ "disableMinSize",