关注提醒显示头像

This commit is contained in:
xuwenyang 2019-11-09 22:04:18 +08:00
parent 4bdedaf170
commit 2e8c40d119

View file

@ -81,13 +81,17 @@ export default class Notification extends Component {
} }
renderFollow(msg) { renderFollow(msg) {
const body = `${msg.content.user.name} 关注了你`; const userIcon = msg.link_user_icon;
return ( return (
<Touchable key={msg.link_id} onPress={() => this.props.onFollowPress(msg)}> <Touchable key={msg.link_id} onPress={() => this.props.onFollowPress(msg)}>
<View style={localStyle.container}> <View style={localStyle.container}>
<Ionicons name="ios-heart" size={16} style={localStyle.icon} color='#d9534f' /> <Ionicons name="ios-heart" size={14} style={localStyle.icon} color='#d9534f' />
<Text key={msg.link_id} style={localStyle.text}>{body}</Text> <UserIcon
iconUrl={userIcon}
width={24} height={24}
/>
<Text style={localStyle.text}>关注了你</Text>
{this.renderDeleteButton(msg)} {this.renderDeleteButton(msg)}
</View> </View>
</Touchable> </Touchable>
@ -145,7 +149,8 @@ const localStyle = StyleSheet.create({
icon2: { icon2: {
width: 15, width: 15,
height: 15, height: 15,
marginRight: 10, marginLeft: -1,
marginRight: 9,
marginTop: 7, marginTop: 7,
}, },
delete: { delete: {