mirror of
https://github.com/Vencord/Vesktop.git
synced 2025-02-24 06:05:09 +00:00
simplified logic for selecting tray icon on tray init
This commit is contained in:
parent
7dacbb7dda
commit
af04134c37
1 changed files with 2 additions and 5 deletions
|
@ -120,13 +120,10 @@ function initTray(win: BrowserWindow) {
|
|||
}
|
||||
}
|
||||
]);
|
||||
tray = new Tray(ICON_PATH);
|
||||
if (Settings.store.trayIconPath) {
|
||||
const trayImage = nativeImage.createFromPath(Settings.store.trayIconPath);
|
||||
if (!trayImage.isEmpty()) tray = new Tray(trayImage.resize({width: 32, height: 32}));
|
||||
else tray = new Tray(ICON_PATH);
|
||||
}
|
||||
else {
|
||||
tray = new Tray(ICON_PATH);
|
||||
if (!trayImage.isEmpty()) tray.setImage(trayImage.resize({width: 32, height: 32}));
|
||||
}
|
||||
|
||||
tray.setToolTip("Vesktop");
|
||||
|
|
Loading…
Add table
Reference in a new issue