From 895d7b97f45643410008b2f511a1a3a084568fa3 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 6 Jun 2021 13:02:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=89=E6=97=B6=E5=80=99?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E6=92=AD=E6=94=BE=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E6=97=B6=E6=AD=8C=E6=9B=B2=E5=B0=81=E9=9D=A2=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/screens/PlayDetail/Portrait/Player/Pic.js | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index 87e3f13..7436682 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -10,3 +10,4 @@ - 尝试修复弹出菜单、列表位置不正确的问题 - 修复打开kg源歌单链接失败的问题 - 尝试修复有时候进入播放详情歌词界面时会导致应用UI被冻结的问题 +- 修复有时候进入播放详情页时歌曲封面大小显示不正确的问题 diff --git a/src/screens/PlayDetail/Portrait/Player/Pic.js b/src/screens/PlayDetail/Portrait/Player/Pic.js index f8110f1..e8d76c8 100644 --- a/src/screens/PlayDetail/Portrait/Player/Pic.js +++ b/src/screens/PlayDetail/Portrait/Player/Pic.js @@ -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 ( - +