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
1995a1dc44
commit
895d7b97f4
@ -10,3 +10,4 @@
|
||||
- 尝试修复弹出菜单、列表位置不正确的问题
|
||||
- 修复打开kg源歌单链接失败的问题
|
||||
- 尝试修复有时候进入播放详情歌词界面时会导致应用UI被冻结的问题
|
||||
- 修复有时候进入播放详情页时歌曲封面大小显示不正确的问题
|
||||
|
@ -1,13 +1,13 @@
|
||||
import React, { memo, useMemo, useState, useEffect } from 'react'
|
||||
import { View, Image, StyleSheet } from 'react-native'
|
||||
import { useGetter, useDispatch } from '@/store'
|
||||
import { useLayout } from '@/utils/hooks'
|
||||
// import { useLayout } from '@/utils/hooks'
|
||||
import { useNavigationComponentDidAppear } from '@/navigation'
|
||||
import { getWindowSise } from '@/utils/tools'
|
||||
|
||||
export default memo(({ componentId }) => {
|
||||
const playMusicInfo = useGetter('player', 'playMusicInfo')
|
||||
const theme = useGetter('common', 'theme')
|
||||
const { onLayout, ...layout } = useLayout()
|
||||
const [animated, setAnimated] = useState(false)
|
||||
|
||||
const musicInfo = useMemo(() => {
|
||||
@ -18,10 +18,10 @@ export default memo(({ componentId }) => {
|
||||
setAnimated(true)
|
||||
})
|
||||
|
||||
const imgWidth = Math.max(layout.width * 0.8, 100)
|
||||
const imgWidth = getWindowSise().width * 0.8
|
||||
|
||||
return (
|
||||
<View style={styles.container} onLayout={onLayout}>
|
||||
<View style={styles.container}>
|
||||
<View style={{ ...styles.content, elevation: animated ? 3 : 0 }}>
|
||||
<Image source={{ uri: musicInfo.img }} nativeID={`pic${musicInfo.songmid}Dest`} progressiveRenderingEnabled={true} borderRadius={2} style={{
|
||||
...styles.img,
|
||||
|
Loading…
x
Reference in New Issue
Block a user