mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-05-23 22:37:41 +08:00
修复列表数据更新后,选中列表被意外重置回默认列表的问题
This commit is contained in:
parent
2169c9eb3b
commit
4a0e09087c
@ -28,7 +28,7 @@ const updateUserList = async(userLists: LX.List.UserListInfo[]) => {
|
|||||||
|
|
||||||
const checkListExist = (changedIds: string[]) => {
|
const checkListExist = (changedIds: string[]) => {
|
||||||
const index = changedIds.indexOf(listState.activeListId)
|
const index = changedIds.indexOf(listState.activeListId)
|
||||||
if (index < 0) return
|
if (index < 0 || listState.allList.some(l => l.id == listState.activeListId)) return
|
||||||
setActiveList(LIST_IDS.DEFAULT)
|
setActiveList(LIST_IDS.DEFAULT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user