1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
xmflsct
2023-01-11 22:54:24 +01:00
parent 76d4bc754b
commit 7f97908e23
8 changed files with 27 additions and 21 deletions

View File

@ -14,9 +14,11 @@ const HeaderSharedReplies: React.FC = () => {
const { t } = useTranslation(['common', 'componentTimeline'])
const { colors } = useTheme()
const mentionsBeginning = rawContent?.current?.[0]
.match(new RegExp(/^(?:@\S+\s+)+/))?.[0]
?.match(new RegExp(/@\S+/, 'g'))
const mentionsBeginning = rawContent?.current?.[0]?.length
? rawContent?.current?.[0]
.match(new RegExp(/^(?:@\S+\s+)+/))?.[0]
?.match(new RegExp(/@\S+/, 'g'))
: undefined
excludeMentions &&
(excludeMentions.current =
mentionsBeginning?.length && status?.mentions