diff --git a/publish/changeLog.md b/publish/changeLog.md index 00e049cc..91f91b8b 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,6 +1,3 @@ ### 修复 -- 修复播放下载列表的歌曲时切歌的问题 -- 修复播放下载列表的歌曲时歌词无法显示的问题 -- 修复下载列表稍后播放功能无效的问题 -- 修复同步服务器启动失败时,关闭同步服务不会清空失败信息的问题 +- 修复某些情况下同步功能会导致切歌混乱的问题 diff --git a/src/renderer/store/modules/list.js b/src/renderer/store/modules/list.js index b53c6d71..30034f64 100644 --- a/src/renderer/store/modules/list.js +++ b/src/renderer/store/modules/list.js @@ -82,6 +82,16 @@ const mutations = { setSyncListData(state, { defaultList, loveList, userList }) { state.defaultList.list.splice(0, state.defaultList.list.length, ...defaultList.list) state.loveList.list.splice(0, state.loveList.list.length, ...loveList.list) + for (let index = 0; index < userList.length; index++) { + const list = userList[index] + const targetList = allList[list.id] + if (targetList) { + userList.splice(index, 1, targetList) + targetList.name = list.name + targetList.list.splice(0, targetList.list.length, ...list.list) + } + } + console.log() state.userList = userList allListInit(state.defaultList, state.loveList, state.userList) },