修复临时列表变更会意外触发同步的问题
parent
2de6d1c5f1
commit
61013e9d2d
|
@ -30,6 +30,7 @@
|
|||
- 修复亮暗主题自动切换功能无效的问题(#1697)
|
||||
- 修复 MacOS 平台在 Finder 打开文件或目录时应用卡死的问题(#1684)
|
||||
- 修复下载模块在数据写入速度较慢的情况下出现任务及文件异常的问题
|
||||
- 修复临时列表变更会意外触发同步的问题
|
||||
|
||||
### 其他
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ export const registerListActionEvent = (sendListAction: (action: LX.Sync.List.Ac
|
|||
await sendListAction({ action: 'list_update_position', data: { position, ids } })
|
||||
}
|
||||
const list_music_overwrite = async(listId: string, musicInfos: LX.Music.MusicInfo[], isRemote: boolean = false) => {
|
||||
if (isRemote) return
|
||||
if (isRemote || listId == LIST_IDS.TEMP) return
|
||||
await sendListAction({ action: 'list_music_overwrite', data: { listId, musicInfos } })
|
||||
}
|
||||
const list_music_add = async(id: string, musicInfos: LX.Music.MusicInfo[], addMusicLocationType: LX.AddMusicLocationType, isRemote: boolean = false) => {
|
||||
|
@ -67,11 +67,12 @@ export const registerListActionEvent = (sendListAction: (action: LX.Sync.List.Ac
|
|||
await sendListAction({ action: 'list_music_move', data: { fromId, toId, musicInfos, addMusicLocationType } })
|
||||
}
|
||||
const list_music_remove = async(listId: string, ids: string[], isRemote: boolean = false) => {
|
||||
if (isRemote) return
|
||||
if (isRemote || listId == LIST_IDS.TEMP) return
|
||||
await sendListAction({ action: 'list_music_remove', data: { listId, ids } })
|
||||
}
|
||||
const list_music_update = async(musicInfos: LX.List.ListActionMusicUpdate, isRemote: boolean = false) => {
|
||||
if (isRemote) return
|
||||
musicInfos = musicInfos.filter(item => item.id != LIST_IDS.TEMP)
|
||||
if (isRemote || !musicInfos.length) return
|
||||
await sendListAction({ action: 'list_music_update', data: musicInfos })
|
||||
}
|
||||
const list_music_clear = async(ids: string[], isRemote: boolean = false) => {
|
||||
|
@ -79,7 +80,7 @@ export const registerListActionEvent = (sendListAction: (action: LX.Sync.List.Ac
|
|||
await sendListAction({ action: 'list_music_clear', data: ids })
|
||||
}
|
||||
const list_music_update_position = async(listId: string, position: number, ids: string[], isRemote: boolean = false) => {
|
||||
if (isRemote) return
|
||||
if (isRemote || listId == LIST_IDS.TEMP) return
|
||||
await sendListAction({ action: 'list_music_update_position', data: { listId, position, ids } })
|
||||
}
|
||||
global.lx.event_list.on('list_data_overwrite', list_data_overwrite)
|
||||
|
|
Loading…
Reference in New Issue