File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,10 @@ app.on("activate", () => {
166
166
app . on ( "ready" , ( ) => {
167
167
setApplicationMenu ( ) ;
168
168
mainWindow = createMainWindow ( ) ;
169
- setUpTray ( app , mainWindow ) ;
169
+ const tray = setUpTray ( app , mainWindow ) ;
170
+ tray . on ( "click" , ( ) => {
171
+ mainWindow . isVisible ( ) ? mainWindow . hide ( ) : mainWindow . show ( ) ;
172
+ } ) ;
170
173
171
174
if ( ! is . dev ( ) && autoUpdate ( ) ) {
172
175
autoUpdater . checkForUpdatesAndNotify ( ) ;
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ module.exports.setUpTray = (app, win) => {
22
22
} ) ;
23
23
tray = new Tray ( trayIcon ) ;
24
24
tray . setToolTip ( "Youtube Music" ) ;
25
+ tray . setIgnoreDoubleClickEvents ( true ) ;
25
26
26
27
const trayMenu = Menu . buildFromTemplate ( [
27
28
{
@@ -66,4 +67,6 @@ module.exports.setUpTray = (app, win) => {
66
67
} ,
67
68
] ) ;
68
69
tray . setContextMenu ( trayMenu ) ;
70
+
71
+ return tray ;
69
72
} ;
You can’t perform that action at this time.
0 commit comments