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