修复定时退出可能导致崩溃的问题

This commit is contained in:
lyswhut 2022-04-12 13:00:04 +08:00
parent 5533ac6067
commit 0ef063e7b2
2 changed files with 4 additions and 3 deletions

View File

@ -17,6 +17,7 @@
- 每次启动时过滤无效的歌曲
- 修复换源失败时的处理问题
- 修复非循环模式下播放结束后的状态显示问题及无法重新播放的问题(#104
- 修复定时退出可能导致崩溃的问题
### 变更

View File

@ -1,5 +1,5 @@
import { hideLyric } from './lyricDesktop'
import { destroy as destroyPlayer } from '@/plugins/player/utils'
import { destroy as destroyPlayer, pause } from '@/plugins/player/utils'
import { exitApp as utilExitApp } from './utils'
let isDestroying = false
@ -8,8 +8,8 @@ export const exitApp = () => {
isDestroying = true
Promise.all([
hideLyric(),
destroyPlayer(),
]).finally(() => {
pause(),
]).finally(destroyPlayer).finally(() => {
isDestroying = false
utilExitApp()
})