[FIX] Here and all mentions shouldn't refer to users (#2137)

This commit is contained in:
Diego Mello 2020-05-20 09:53:40 -03:00 committed by GitHub
parent 3b18712bc7
commit 1cadfb3d27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 13 deletions

View File

@ -666,17 +666,19 @@ exports[`Storyshots Markdown list Markdown 1`] = `
</Text> </Text>
<Text <Text
onPress={[Function]}
style={ style={
Array [ Array [
Object { Object {
"backgroundColor": "#FF5B5A", "backgroundColor": "#E8F2FF",
"color": "#ffffff", "color": "#ffffff",
"fontFamily": "System", "fontFamily": "System",
"fontSize": 16, "fontSize": 16,
"fontWeight": "500", "fontWeight": "500",
"padding": 5, "padding": 5,
}, },
Object {
"backgroundColor": "#FF5B5A",
},
] ]
} }
> >
@ -709,17 +711,19 @@ exports[`Storyshots Markdown list Markdown 1`] = `
</Text> </Text>
<Text <Text
onPress={[Function]}
style={ style={
Array [ Array [
Object { Object {
"backgroundColor": "#FF5B5A", "backgroundColor": "#E8F2FF",
"color": "#ffffff", "color": "#ffffff",
"fontFamily": "System", "fontFamily": "System",
"fontSize": 16, "fontSize": 16,
"fontWeight": "500", "fontWeight": "500",
"padding": 5, "padding": 5,
}, },
Object {
"backgroundColor": "#FF5B5A",
},
] ]
} }
> >
@ -896,17 +900,19 @@ exports[`Storyshots Markdown list Markdown 1`] = `
</Text> </Text>
<Text <Text
onPress={[Function]}
style={ style={
Array [ Array [
Object { Object {
"backgroundColor": "#FF5B5A", "backgroundColor": "#E8F2FF",
"color": "#ffffff", "color": "#ffffff",
"fontFamily": "System", "fontFamily": "System",
"fontSize": 16, "fontSize": 16,
"fontWeight": "500", "fontWeight": "500",
"padding": 5, "padding": 5,
}, },
Object {
"backgroundColor": "#FF5B5A",
},
] ]
} }
> >
@ -939,17 +945,19 @@ exports[`Storyshots Markdown list Markdown 1`] = `
</Text> </Text>
<Text <Text
onPress={[Function]}
style={ style={
Array [ Array [
Object { Object {
"backgroundColor": "#FF5B5A", "backgroundColor": "#E8F2FF",
"color": "#ffffff", "color": "#ffffff",
"fontFamily": "System", "fontFamily": "System",
"fontSize": 16, "fontSize": 16,
"fontWeight": "500", "fontWeight": "500",
"padding": 5, "padding": 5,
}, },
Object {
"backgroundColor": "#FF5B5A",
},
] ]
} }
> >

View File

@ -11,11 +11,10 @@ const AtMention = React.memo(({
}) => { }) => {
let mentionStyle = { ...styles.mention, color: themes[theme].buttonText }; let mentionStyle = { ...styles.mention, color: themes[theme].buttonText };
if (mention === 'all' || mention === 'here') { if (mention === 'all' || mention === 'here') {
mentionStyle = { return <Text style={[mentionStyle, styles.mentionAll, ...style]}>{mention}</Text>;
...mentionStyle, }
...styles.mentionAll
}; if (mention === username) {
} else if (mention === username) {
mentionStyle = { mentionStyle = {
...mentionStyle, ...mentionStyle,
backgroundColor: themes[theme].actionTintColor backgroundColor: themes[theme].actionTintColor