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

View File

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