mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Move tray click callback in setUpTray
This commit is contained in:
5
tray.js
5
tray.js
@ -23,6 +23,9 @@ module.exports.setUpTray = (app, win) => {
|
||||
tray = new Tray(trayIcon);
|
||||
tray.setToolTip("Youtube Music");
|
||||
tray.setIgnoreDoubleClickEvents(true);
|
||||
tray.on("click", () => {
|
||||
win.isVisible() ? win.hide() : win.show();
|
||||
});
|
||||
|
||||
const trayMenu = Menu.buildFromTemplate([
|
||||
{
|
||||
@ -67,6 +70,4 @@ module.exports.setUpTray = (app, win) => {
|
||||
},
|
||||
]);
|
||||
tray.setContextMenu(trayMenu);
|
||||
|
||||
return tray;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user