mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 13:17:46 +00:00
fix: the initial music sort error when restart app (#79)
This commit is contained in:
parent
b394ec0899
commit
993f867109
1 changed files with 4 additions and 3 deletions
|
|
@ -43,10 +43,11 @@ Howler.volume(store.state.player.volume);
|
||||||
// 防止软件第一次打开资源加载2次
|
// 防止软件第一次打开资源加载2次
|
||||||
Howler.autoUnlock = false;
|
Howler.autoUnlock = false;
|
||||||
|
|
||||||
const currentTrackId = store.state?.player?.currentTrack?.id;
|
const currentTrack = store.state?.player?.currentTrack;
|
||||||
if (currentTrackId) {
|
if (currentTrack?.id) {
|
||||||
store.dispatch("switchTrack", {
|
store.dispatch("switchTrack", {
|
||||||
id: currentTrackId,
|
id: currentTrack.id,
|
||||||
|
sort: currentTrack.sort,
|
||||||
autoplay: false,
|
autoplay: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue