修复界面不可见时状态栏歌词没有更新的问题
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { watch } from '@common/utils/vueTools'
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
import { setDisableAutoPauseBySource } from '@renderer/core/lyric'
|
||||
|
||||
export default () => {
|
||||
const handleEnable = (enable: boolean) => {
|
||||
setDisableAutoPauseBySource(enable, 'statusBarLyric')
|
||||
}
|
||||
watch(() => appSetting['player.isShowStatusBarLyric'], enable => {
|
||||
handleEnable(enable)
|
||||
})
|
||||
|
||||
return async() => {
|
||||
if (appSetting['player.isShowStatusBarLyric']) {
|
||||
handleEnable(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user