mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-03 15:12:10 +08:00
修复随机播放模式下在同列表切其他歌曲不会清空已播放列表的问题
This commit is contained in:
parent
6702d64d52
commit
84787f82b0
@ -1,11 +1,3 @@
|
||||
### 优化
|
||||
|
||||
- 添加更多错误信息的记录
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复潜在的获取缓存大小报错问题
|
||||
- 修复mg排行榜无法加载的问题
|
||||
- 修复列表导出失败时的提示信息缺失翻译的问题
|
||||
- 修复 Android 11 导入列表时,不显示备份文件的问题
|
||||
- 修复其他应用播放声音时,软件临时暂停播放后通知栏的状态仍显示正在播放的问题
|
||||
- 修复随机播放模式下在同列表切其他歌曲不会清空已播放列表的问题
|
||||
|
@ -14,7 +14,7 @@ import { getListScrollPosition, saveListScrollPosition, toast } from '@/utils/to
|
||||
import { useTranslation } from '@/plugins/i18n'
|
||||
import { LIST_ITEM_HEIGHT } from '@/config/constant'
|
||||
import MusicPositionModal from './components/MusicPositionModal'
|
||||
import { BorderWidths } from '@/theme'
|
||||
// import { BorderWidths } from '@/theme'
|
||||
import ListSearchBar from './components/ListSearchBar'
|
||||
import { debounceSearchList } from './utils'
|
||||
import { useLayout } from '@/utils/hooks'
|
||||
@ -56,7 +56,7 @@ const List = () => {
|
||||
const currentList = useMemo(() => currentListRef.current = (allList.find(l => l.id == activeListId) || allList[0]), [allList, activeListId])
|
||||
const activeItemId = useMemo(() => currentList.list && activeIndex > -1 && currentList.list[activeIndex] ? String(currentList.list[activeIndex].songmid) : null, [currentList, activeIndex])
|
||||
const setPlayList = useDispatch('player', 'setList')
|
||||
const playMusic = useDispatch('player', 'playMusic')
|
||||
// const playMusic = useDispatch('player', 'playMusic')
|
||||
const setTempPlayList = useDispatch('player', 'setTempPlayList')
|
||||
const removeListItem = useDispatch('list', 'listRemove')
|
||||
const removeListMultiItem = useDispatch('list', 'listRemoveMultiple')
|
||||
@ -81,18 +81,18 @@ const List = () => {
|
||||
}, [playListInfo])
|
||||
|
||||
const handlePlay = useCallback(async(data, index) => {
|
||||
if (playListInfoRef.current.id != activeListIdRef.current) {
|
||||
// if (playListInfoRef.current.id != activeListIdRef.current) {
|
||||
setPlayList({
|
||||
list: currentListRef.current,
|
||||
index,
|
||||
})
|
||||
} else {
|
||||
playMusic({
|
||||
musicInfo: data,
|
||||
listId: activeListIdRef.current,
|
||||
})
|
||||
}
|
||||
}, [setPlayList, playMusic])
|
||||
// } else {
|
||||
// playMusic({
|
||||
// musicInfo: data,
|
||||
// listId: activeListIdRef.current,
|
||||
// })
|
||||
// }
|
||||
}, [setPlayList])
|
||||
|
||||
const handleSelect = useCallback((item, index) => {
|
||||
if (selectModeRef.current == 'single') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user