减慢歌词详情页歌词滚动速度

This commit is contained in:
lyswhut 2023-09-20 13:40:10 +08:00
parent c12bc8a4df
commit f6fce15440
3 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
### 优化 ### 优化
- 通过歌曲菜单添加不喜欢歌曲时需要二次确认防止手抖 - 通过歌曲菜单添加不喜欢歌曲时需要二次确认防止手抖
- 减慢歌词详情页歌词滚动速度
### 修复 ### 修复

View File

@ -110,7 +110,7 @@ export default () => {
} }
offset += (listLayoutInfoRef.current.lineHeights[line] ?? 0) / 2 offset += (listLayoutInfoRef.current.lineHeights[line] ?? 0) / 2
try { try {
scrollCancelRef.current = scrollTo(flatListRef.current, scrollInfoRef.current, offset - scrollInfoRef.current.layoutMeasurement.height * 0.42, 300, () => { scrollCancelRef.current = scrollTo(flatListRef.current, scrollInfoRef.current, offset - scrollInfoRef.current.layoutMeasurement.height * 0.42, 600, () => {
scrollCancelRef.current = null scrollCancelRef.current = null
}) })
} catch {} } catch {}

View File

@ -150,7 +150,7 @@ export default () => {
} }
offset += (listLayoutInfoRef.current.lineHeights[line] ?? 0) / 2 offset += (listLayoutInfoRef.current.lineHeights[line] ?? 0) / 2
try { try {
scrollCancelRef.current = scrollTo(flatListRef.current, scrollInfoRef.current, offset - scrollInfoRef.current.layoutMeasurement.height * 0.42, 300, () => { scrollCancelRef.current = scrollTo(flatListRef.current, scrollInfoRef.current, offset - scrollInfoRef.current.layoutMeasurement.height * 0.42, 600, () => {
scrollCancelRef.current = null scrollCancelRef.current = null
}) })
} catch {} } catch {}