mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-03 17:02:10 +08:00
修复我的列表搜索输入某些字符会导致应用崩溃的问题
This commit is contained in:
parent
2f769d3936
commit
f9cb322abe
@ -1,9 +1,3 @@
|
||||
### 优化
|
||||
|
||||
- 缓冲进度条颜色
|
||||
- 优化数据存储,若需要存储的数据过大时会将数据切片后存储,现在存储大列表不会导致列表丢失了
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复随机播放模式下在同列表切其他歌曲不会清空已播放列表的问题
|
||||
- 修复歌曲播放出错时的URL刷新问题
|
||||
- 修复我的列表搜索输入某些字符会导致应用崩溃的问题
|
||||
|
@ -65,7 +65,7 @@ const handleSortList = (list, keyword) => {
|
||||
export const debounceSearchList = debounce((text, list, callback) => {
|
||||
const reslutList = []
|
||||
if (!text.length) return
|
||||
let rxp = new RegExp(text.split('').join('.*') + '.*', 'i')
|
||||
let rxp = new RegExp(text.split('').map(s => s.replace(/[.*+?^${}()|[\]\\]/, '\\$&')).join('.*') + '.*', 'i')
|
||||
for (const item of list) {
|
||||
if (rxp.test(`${item.name}${item.singer}${item.albumName ? item.albumName : ''}`)) reslutList.push(item)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user