mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-04 00:52:09 +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 { useTranslation } from '@/plugins/i18n'
|
||||||
import { LIST_ITEM_HEIGHT } from '@/config/constant'
|
import { LIST_ITEM_HEIGHT } from '@/config/constant'
|
||||||
import MusicPositionModal from './components/MusicPositionModal'
|
import MusicPositionModal from './components/MusicPositionModal'
|
||||||
import { BorderWidths } from '@/theme'
|
// import { BorderWidths } from '@/theme'
|
||||||
import ListSearchBar from './components/ListSearchBar'
|
import ListSearchBar from './components/ListSearchBar'
|
||||||
import { debounceSearchList } from './utils'
|
import { debounceSearchList } from './utils'
|
||||||
import { useLayout } from '@/utils/hooks'
|
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 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 activeItemId = useMemo(() => currentList.list && activeIndex > -1 && currentList.list[activeIndex] ? String(currentList.list[activeIndex].songmid) : null, [currentList, activeIndex])
|
||||||
const setPlayList = useDispatch('player', 'setList')
|
const setPlayList = useDispatch('player', 'setList')
|
||||||
const playMusic = useDispatch('player', 'playMusic')
|
// const playMusic = useDispatch('player', 'playMusic')
|
||||||
const setTempPlayList = useDispatch('player', 'setTempPlayList')
|
const setTempPlayList = useDispatch('player', 'setTempPlayList')
|
||||||
const removeListItem = useDispatch('list', 'listRemove')
|
const removeListItem = useDispatch('list', 'listRemove')
|
||||||
const removeListMultiItem = useDispatch('list', 'listRemoveMultiple')
|
const removeListMultiItem = useDispatch('list', 'listRemoveMultiple')
|
||||||
@ -81,18 +81,18 @@ const List = () => {
|
|||||||
}, [playListInfo])
|
}, [playListInfo])
|
||||||
|
|
||||||
const handlePlay = useCallback(async(data, index) => {
|
const handlePlay = useCallback(async(data, index) => {
|
||||||
if (playListInfoRef.current.id != activeListIdRef.current) {
|
// if (playListInfoRef.current.id != activeListIdRef.current) {
|
||||||
setPlayList({
|
setPlayList({
|
||||||
list: currentListRef.current,
|
list: currentListRef.current,
|
||||||
index,
|
index,
|
||||||
})
|
})
|
||||||
} else {
|
// } else {
|
||||||
playMusic({
|
// playMusic({
|
||||||
musicInfo: data,
|
// musicInfo: data,
|
||||||
listId: activeListIdRef.current,
|
// listId: activeListIdRef.current,
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
}, [setPlayList, playMusic])
|
}, [setPlayList])
|
||||||
|
|
||||||
const handleSelect = useCallback((item, index) => {
|
const handleSelect = useCallback((item, index) => {
|
||||||
if (selectModeRef.current == 'single') {
|
if (selectModeRef.current == 'single') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user