mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-02 19:42:10 +08:00
17 lines
411 B
JavaScript
17 lines
411 B
JavaScript
import { hideLyric } from './lyricDesktop'
|
|
import { destroy as destroyPlayer, pause } from '@/plugins/player/utils'
|
|
import { exitApp as utilExitApp } from './utils'
|
|
|
|
let isDestroying = false
|
|
export const exitApp = () => {
|
|
if (isDestroying) return
|
|
isDestroying = true
|
|
Promise.all([
|
|
hideLyric(),
|
|
pause(),
|
|
]).finally(destroyPlayer).finally(() => {
|
|
isDestroying = false
|
|
utilExitApp()
|
|
})
|
|
}
|