1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Reply working

This commit is contained in:
Zhiyuan Zheng
2020-12-13 01:24:25 +01:00
parent f0daae30cd
commit cfd2d40d02
13 changed files with 346 additions and 180 deletions

View File

@ -126,31 +126,29 @@ const TimelineHeaderNotification: React.FC<Props> = ({ notification }) => {
return (
<View style={styles.base}>
<View style={{ flexBasis: '80%' }}>
<View style={styles.nameAndAction}>
<View style={styles.name}>
{emojis?.length ? (
<Emojis
content={name}
emojis={emojis}
size={StyleConstants.Font.Size.M}
fontBold={true}
/>
) : (
<Text
numberOfLines={1}
style={[styles.nameWithoutEmoji, { color: theme.primary }]}
>
{name}
</Text>
)}
<View style={styles.nameAndMeta}>
<View style={styles.name}>
{emojis?.length ? (
<Emojis
content={name}
emojis={emojis}
size={StyleConstants.Font.Size.M}
fontBold={true}
/>
) : (
<Text
style={[styles.account, { color: theme.secondary }]}
numberOfLines={1}
style={[styles.nameWithoutEmoji, { color: theme.primary }]}
>
@{account}
{name}
</Text>
</View>
)}
<Text
style={[styles.account, { color: theme.secondary }]}
numberOfLines={1}
>
@{account}
</Text>
</View>
<View style={styles.meta}>
@ -180,6 +178,7 @@ const TimelineHeaderNotification: React.FC<Props> = ({ notification }) => {
)}
</View>
</View>
{notification.type === 'follow' && (
<View style={styles.relationship}>{relationshipIcon}</View>
)}
@ -192,22 +191,16 @@ const styles = StyleSheet.create({
flex: 1,
flexDirection: 'row'
},
nameAndAction: {
width: '100%',
flexDirection: 'row',
justifyContent: 'space-between'
nameAndMeta: {
width: '80%'
},
name: {
flexBasis: '90%',
flexDirection: 'row'
},
nameWithoutEmoji: {
fontSize: StyleConstants.Font.Size.M,
fontWeight: StyleConstants.Font.Weight.Bold
},
action: {
alignItems: 'flex-end'
},
account: {
flexShrink: 1,
marginLeft: StyleConstants.Spacing.XS