修复最小化托盘设置不起作用的问题
parent
9075b6629f
commit
2359a1444b
|
@ -27,7 +27,7 @@ const setLyricsConfig = debounce(config => {
|
|||
const winEvent = lyricWindow => {
|
||||
// let bounds
|
||||
// lyricWindow.on('close', event => {
|
||||
// if (global.isQuitting || !global.appSetting.tray.isToTray || (!isWin && !global.isTrafficLightClose)) {
|
||||
// if (global.isQuitting || !global.appSetting.tray.isShow || (!isWin && !global.isTrafficLightClose)) {
|
||||
// lyricWindow.setProgressBar(-1)
|
||||
// return
|
||||
// }
|
||||
|
|
|
@ -5,7 +5,7 @@ global.isTrafficLightClose = false // 是否点击软件上的关闭按钮关闭
|
|||
|
||||
module.exports = mainWindow => {
|
||||
mainWindow.on('close', event => {
|
||||
if (global.isQuitting || !global.appSetting.tray.isToTray || (!isWin && !global.isTrafficLightClose)) {
|
||||
if (global.isQuitting || !global.appSetting.tray.isShow || (!isWin && !global.isTrafficLightClose)) {
|
||||
mainWindow.setProgressBar(-1)
|
||||
global.lx_event.winLyric.close()
|
||||
return
|
||||
|
|
|
@ -29,7 +29,7 @@ eventHub.on(baseName.bindKey, () => {
|
|||
|
||||
// 软件内快捷键的最小化触发时
|
||||
// 如果已启用托盘,则隐藏程序,否则最小化程序 https://github.com/lyswhut/lx-music-desktop/issues/603
|
||||
if (appHotKeyConfig.local.keys[key].action == hotKeyNamesCommon.min.action && global.appSetting.tray.isToTray) {
|
||||
if (appHotKeyConfig.local.keys[key].action == hotKeyNamesCommon.min.action && global.appSetting.tray.isShow) {
|
||||
eventHub.emit(hotKeyNamesCommon.hide_toggle.action)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue