[FIX] Fix quote message layout (#4568)

* fix layout

* fix quote

* update snapshot
This commit is contained in:
Gleidson Daniel Silva 2022-10-04 10:05:40 -03:00 committed by Diego Mello
parent 2779f74102
commit 2b5c53e802
3 changed files with 11 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,8 @@ const styles = StyleSheet.create({
}, },
username: { username: {
fontSize: 16, fontSize: 16,
...sharedStyles.textMedium ...sharedStyles.textMedium,
flexShrink: 1
}, },
time: { time: {
fontSize: 12, fontSize: 12,
@ -67,7 +68,7 @@ const ReplyPreview = React.memo(
<View style={[styles.container, { backgroundColor: themes[theme].messageboxBackground }]}> <View style={[styles.container, { backgroundColor: themes[theme].messageboxBackground }]}>
<View style={[styles.messageContainer, { backgroundColor: themes[theme].chatComponentBackground }]}> <View style={[styles.messageContainer, { backgroundColor: themes[theme].chatComponentBackground }]}>
<View style={styles.header}> <View style={styles.header}>
<Text style={[styles.username, { color: themes[theme].tintColor }]}> <Text numberOfLines={1} style={[styles.username, { color: themes[theme].tintColor }]}>
{useRealName ? message.u?.name : message.u?.username} {useRealName ? message.u?.name : message.u?.username}
</Text> </Text>
<Text style={[styles.time, { color: themes[theme].auxiliaryText }]}>{time}</Text> <Text style={[styles.time, { color: themes[theme].auxiliaryText }]}>{time}</Text>

View File

@ -45,7 +45,8 @@ const styles = StyleSheet.create({
}, },
author: { author: {
fontSize: 16, fontSize: 16,
...sharedStyles.textMedium ...sharedStyles.textMedium,
flexShrink: 1
}, },
fieldsContainer: { fieldsContainer: {
flex: 1, flex: 1,
@ -99,7 +100,9 @@ const Title = React.memo(
return ( return (
<View style={styles.authorContainer}> <View style={styles.authorContainer}>
{attachment.author_name ? ( {attachment.author_name ? (
<Text style={[styles.author, { color: themes[theme].auxiliaryTintColor }]}>{attachment.author_name}</Text> <Text numberOfLines={1} style={[styles.author, { color: themes[theme].auxiliaryTintColor }]}>
{attachment.author_name}
</Text>
) : null} ) : null}
{time ? <Text style={[messageStyles.time, { color: themes[theme].auxiliaryText }]}>{time}</Text> : null} {time ? <Text style={[messageStyles.time, { color: themes[theme].auxiliaryText }]}>{time}</Text> : null}
{attachment.title ? <Text style={[styles.title, { color: themes[theme].bodyText }]}>{attachment.title}</Text> : null} {attachment.title ? <Text style={[styles.title, { color: themes[theme].bodyText }]}>{attachment.title}</Text> : null}