修复桌面歌词在关闭软件时被重置回关闭状态的问题

This commit is contained in:
lyswhut
2022-12-05 13:05:17 +08:00
parent 5c7652afe8
commit 92c77332a0
9 changed files with 29 additions and 32 deletions
+5 -12
View File
@@ -17,23 +17,16 @@ const setLyricsConfig = debounce((config: Partial<LX.AppSetting>) => {
const winEvent = () => {
if (!browserWindow) return
// let bounds
// lyricWindow.on('close', event => {
// if (global.isQuitting || !global.appSetting.tray.enable || (!isWin && !global.isTrafficLightClose)) {
// lyricWindow.setProgressBar(-1)
// return
// }
// if (global.isTrafficLightClose) global.isTrafficLightClose = false
// event.preventDefault()
// lyricWindow.hide()
// browserWindow.on('close', () => {
// if (global.lx.appSetting['desktopLyric.enable'] && !global.lx.mainWindowClosed) {
// browserWindow = null
// global.lx.event_app.update_config({ 'desktopLyric.enable': false })
// }
// })
browserWindow.on('closed', () => {
browserWindow = null
if (global.lx.appSetting['desktopLyric.enable']) {
global.lx.event_app.update_config({ 'desktopLyric.enable': false })
}
})
browserWindow.on('move', () => {