同步功能添加对列表顺序调整的控制

This commit is contained in:
lyswhut
2021-12-17 17:18:56 +08:00
parent 5b7c965c48
commit e3acb7ce4e
4 changed files with 56 additions and 16 deletions
+3
View File
@@ -320,6 +320,7 @@ const mutations = {
position,
sourceListId,
}
if (position) newList.locationUpdateTime = Date.now()
addUserList(newList)
}
this.commit('list/listAddMultiple', { id, list, isSync: true })
@@ -364,6 +365,7 @@ const mutations = {
let targetList = userLists[index]
userLists.splice(index, 1)
userLists.splice(index - 1, 0, targetList)
targetList.locationUpdateTime = Date.now()
window.eventHub.emit(eventListNames.listChange, [id])
},
movedownUserList(state, { id, isSync }) {
@@ -378,6 +380,7 @@ const mutations = {
let targetList = userLists[index]
userLists.splice(index, 1)
userLists.splice(index + 1, 0, targetList)
targetList.locationUpdateTime = Date.now()
window.eventHub.emit(eventListNames.listChange, [id])
},
setMusicPosition(state, { id, position, list, isSync }) {