File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
const path = require ( "path" ) ;
2
2
3
- const { Menu, nativeImage, Tray } = require ( "electron" ) ;
3
+ const { app , Menu, nativeImage, Tray } = require ( "electron" ) ;
4
4
5
5
const config = require ( "./config" ) ;
6
6
const getSongControls = require ( "./providers/song-controls" ) ;
@@ -27,7 +27,13 @@ module.exports.setUpTray = (app, win) => {
27
27
if ( config . get ( "options.trayClickPlayPause" ) ) {
28
28
playPause ( ) ;
29
29
} else {
30
- win . isVisible ( ) ? win . hide ( ) : win . show ( ) ;
30
+ if ( win . isVisible ( ) ) {
31
+ win . hide ( ) ;
32
+ app . dock ?. hide ( ) ;
33
+ } else {
34
+ win . show ( ) ;
35
+ app . dock ?. show ( ) ;
36
+ }
31
37
}
32
38
} ) ;
33
39
@@ -54,6 +60,7 @@ module.exports.setUpTray = (app, win) => {
54
60
label : "Show" ,
55
61
click : ( ) => {
56
62
win . show ( ) ;
63
+ app . dock ?. show ( ) ;
57
64
} ,
58
65
} ,
59
66
{
@@ -63,7 +70,7 @@ module.exports.setUpTray = (app, win) => {
63
70
app . quit ( ) ;
64
71
} ,
65
72
} ,
66
- { role : "quit" }
73
+ { role : "quit" } ,
67
74
] ;
68
75
69
76
const trayMenu = Menu . buildFromTemplate ( template ) ;
You can’t perform that action at this time.
0 commit comments