修复最小化托盘设置不起作用的问题

pull/733/head
lyswhut 2021-12-14 23:00:20 +08:00
parent 9075b6629f
commit 2359a1444b
3 changed files with 3 additions and 3 deletions

View File

@ -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
// }

View File

@ -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

View File

@ -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
}