mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-04 05:02:11 +08:00
还原隐藏的播放数量
This commit is contained in:
parent
43e45a770a
commit
4e8605cae6
@ -4,7 +4,7 @@ import { AppColors, BorderWidths } from '@/theme'
|
|||||||
import { useGetter } from '@/store'
|
import { useGetter } from '@/store'
|
||||||
import ButtonBar from './ActionBar'
|
import ButtonBar from './ActionBar'
|
||||||
|
|
||||||
const Header = memo(() => {
|
const Header = memo(({ animatePlayed }) => {
|
||||||
const selectListInfo = useGetter('songList', 'selectListInfo')
|
const selectListInfo = useGetter('songList', 'selectListInfo')
|
||||||
const { info: listDetailDataInfo = {} } = useGetter('songList', 'listDetailData')
|
const { info: listDetailDataInfo = {} } = useGetter('songList', 'listDetailData')
|
||||||
const playCount = selectListInfo.play_count || listDetailDataInfo.play_count
|
const playCount = selectListInfo.play_count || listDetailDataInfo.play_count
|
||||||
@ -13,16 +13,15 @@ const Header = memo(() => {
|
|||||||
<View style={{ ...styles.container, borderBottomColor: AppColors.borderColor }}>
|
<View style={{ ...styles.container, borderBottomColor: AppColors.borderColor }}>
|
||||||
<View style={{ flexDirection: 'row', flexGrow: 0, flexShrink: 0, padding: 10 }}>
|
<View style={{ flexDirection: 'row', flexGrow: 0, flexShrink: 0, padding: 10 }}>
|
||||||
<View style={{ ...styles.listItemImg, backgroundColor: AppColors.primary }}>
|
<View style={{ ...styles.listItemImg, backgroundColor: AppColors.primary }}>
|
||||||
<Image nativeID={`pic${selectListInfo.id}Dest`} source={{ uri: selectListInfo.img || listDetailDataInfo.img || null }} borderRadius={4} style={{ flex: 1, resizeMode: 'cover', justifyContent: 'flex-end' }}>
|
<Image nativeID={`pic${selectListInfo.id}Dest`} source={{ uri: selectListInfo.img || listDetailDataInfo.img || null }} borderRadius={4} style={{ flex: 1, resizeMode: 'cover', justifyContent: 'flex-end' }} />
|
||||||
{/* {
|
{
|
||||||
playCount
|
playCount && animatePlayed
|
||||||
? <Text style={{ fontSize: 12, paddingLeft: 3, paddingRight: 3, backgroundColor: 'rgba(0, 0, 0, 0.5)', color: AppColors.primary, borderBottomLeftRadius: 4, borderBottomRightRadius: 4 }} numberOfLines={ 1 }>{playCount}</Text>
|
? <Text style={styles.playCount} numberOfLines={ 1 }>{playCount}</Text>
|
||||||
: null
|
: null
|
||||||
} */}
|
}
|
||||||
</Image>
|
|
||||||
</View>
|
</View>
|
||||||
<View style={{ flexDirection: 'column', flexGrow: 1, flexShrink: 1, paddingLeft: 5 }} nativeID="title">
|
<View style={{ flexDirection: 'column', flexGrow: 1, flexShrink: 1, paddingLeft: 5 }} nativeID="title">
|
||||||
<Text style={{ fontSize: 13, color: AppColors.normal }} numberOfLines={ 1 }>{selectListInfo.name}</Text>
|
<Text style={{ fontSize: 13, color: AppColors.normal }} numberOfLines={ 1 }>{selectListInfo.name || listDetailDataInfo.name}</Text>
|
||||||
<View style={{ flexGrow: 0, flexShrink: 1 }}>
|
<View style={{ flexGrow: 0, flexShrink: 1 }}>
|
||||||
<Text style={{ fontSize: 10, color: AppColors.normal40 }} numberOfLines={ 4 }>{selectListInfo.desc || listDetailDataInfo.desc}</Text>
|
<Text style={{ fontSize: 10, color: AppColors.normal40 }} numberOfLines={ 4 }>{selectListInfo.desc || listDetailDataInfo.desc}</Text>
|
||||||
</View>
|
</View>
|
||||||
@ -66,6 +65,19 @@ const styles = StyleSheet.create({
|
|||||||
// },
|
// },
|
||||||
// }),
|
// }),
|
||||||
},
|
},
|
||||||
|
playCount: {
|
||||||
|
position: 'absolute',
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
width: '100%',
|
||||||
|
fontSize: 12,
|
||||||
|
paddingLeft: 3,
|
||||||
|
paddingRight: 3,
|
||||||
|
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
||||||
|
color: '#fff',
|
||||||
|
borderBottomLeftRadius: 4,
|
||||||
|
borderBottomRightRadius: 4,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
export default Header
|
export default Header
|
||||||
|
@ -37,7 +37,7 @@ export default ({ animatePlayed }) => {
|
|||||||
onRefresh={handleListRefresh}
|
onRefresh={handleListRefresh}
|
||||||
onLoadMore={handleListLoadMore}
|
onLoadMore={handleListLoadMore}
|
||||||
isLoading={listDetailData.isLoading}
|
isLoading={listDetailData.isLoading}
|
||||||
ListHeaderComponent={<ListDetailHeader />}
|
ListHeaderComponent={<ListDetailHeader animatePlayed={animatePlayed} />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{ isGetListDetailFailed ? <Failed /> : null }
|
{ isGetListDetailFailed ? <Failed /> : null }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user