[REGRESSION] Remove @ and # from mention (#1721)
This commit is contained in:
parent
88c0ba6aff
commit
400d33250d
|
@ -4723,7 +4723,7 @@ exports[`Storyshots Message list message 1`] = `
|
|||
]
|
||||
}
|
||||
>
|
||||
@rocket.cat
|
||||
rocket.cat
|
||||
</Text>
|
||||
<Text
|
||||
numberOfLines={0}
|
||||
|
@ -4766,7 +4766,7 @@ exports[`Storyshots Message list message 1`] = `
|
|||
]
|
||||
}
|
||||
>
|
||||
@diego.mello
|
||||
diego.mello
|
||||
</Text>
|
||||
<Text
|
||||
numberOfLines={0}
|
||||
|
@ -4809,7 +4809,7 @@ exports[`Storyshots Message list message 1`] = `
|
|||
]
|
||||
}
|
||||
>
|
||||
@all
|
||||
all
|
||||
</Text>
|
||||
<Text
|
||||
numberOfLines={0}
|
||||
|
@ -4852,7 +4852,7 @@ exports[`Storyshots Message list message 1`] = `
|
|||
]
|
||||
}
|
||||
>
|
||||
@here
|
||||
here
|
||||
</Text>
|
||||
<Text
|
||||
numberOfLines={0}
|
||||
|
@ -4895,7 +4895,7 @@ exports[`Storyshots Message list message 1`] = `
|
|||
]
|
||||
}
|
||||
>
|
||||
#general
|
||||
general
|
||||
</Text>
|
||||
</Text>
|
||||
</View>
|
||||
|
|
|
@ -28,21 +28,27 @@ const AtMention = React.memo(({
|
|||
}
|
||||
|
||||
const handlePress = () => {
|
||||
if (mentions && mentions.length && mentions.findIndex(m => m.username === mention) !== -1) {
|
||||
const index = mentions.findIndex(m => m.username === mention);
|
||||
const navParam = {
|
||||
t: 'd',
|
||||
rid: mentions[index]._id
|
||||
};
|
||||
navToRoomInfo(navParam);
|
||||
}
|
||||
const index = mentions.findIndex(m => m.username === mention);
|
||||
const navParam = {
|
||||
t: 'd',
|
||||
rid: mentions[index]._id
|
||||
};
|
||||
navToRoomInfo(navParam);
|
||||
};
|
||||
|
||||
if (mentions && mentions.length && mentions.findIndex(m => m.username === mention) !== -1) {
|
||||
return (
|
||||
<Text
|
||||
style={[preview ? { ...styles.text, color: themes[theme].bodyText } : mentionStyle, ...style]}
|
||||
onPress={preview ? undefined : handlePress}
|
||||
>
|
||||
{mention}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Text
|
||||
style={[preview ? { ...styles.text, color: themes[theme].bodyText } : mentionStyle, ...style]}
|
||||
onPress={preview ? undefined : handlePress}
|
||||
>
|
||||
<Text style={[styles.text, { color: themes[theme].bodyText }, ...style]}>
|
||||
{`@${ mention }`}
|
||||
</Text>
|
||||
);
|
||||
|
|
|
@ -24,12 +24,12 @@ const Hashtag = React.memo(({
|
|||
style={[preview ? { ...styles.text, color: themes[theme].bodyText } : styles.mention, ...style]}
|
||||
onPress={preview ? undefined : handlePress}
|
||||
>
|
||||
{`#${ hashtag }`}
|
||||
{hashtag}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Text style={[preview ? { ...styles.text, color: themes[theme].bodyText } : styles.mention, ...style]}>
|
||||
<Text style={[styles.text, { color: themes[theme].bodyText }, ...style]}>
|
||||
{`#${ hashtag }`}
|
||||
</Text>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue