mirror of
https://github.com/tooot-app/app
synced 2025-04-19 20:57:36 +02:00
This commit is contained in:
parent
2ce842e15f
commit
8e93492ae3
@ -54,21 +54,19 @@ const renderNode = ({
|
||||
</Text>
|
||||
)
|
||||
} else if (classes.includes('mention') && mentions) {
|
||||
const accountIndex = mentions.findIndex(mention => mention.url === href)
|
||||
return (
|
||||
<Text
|
||||
key={index}
|
||||
style={{
|
||||
color: theme.blue,
|
||||
color: accountIndex !== -1 ? theme.blue : undefined,
|
||||
...StyleConstants.FontStyle[size]
|
||||
}}
|
||||
onPress={() => {
|
||||
const username = href.split(new RegExp(/@(.*)/))
|
||||
const usernameIndex = mentions.findIndex(
|
||||
m => m.username === username[1]
|
||||
)
|
||||
navigation.push('Screen-Shared-Account', {
|
||||
account: mentions[usernameIndex]
|
||||
})
|
||||
accountIndex !== -1 &&
|
||||
navigation.push('Screen-Shared-Account', {
|
||||
account: mentions[accountIndex]
|
||||
})
|
||||
}}
|
||||
>
|
||||
{node.children[0].data}
|
||||
@ -97,13 +95,11 @@ const renderNode = ({
|
||||
}
|
||||
>
|
||||
{!shouldBeTag ? (
|
||||
<>
|
||||
<Feather
|
||||
name='external-link'
|
||||
size={StyleConstants.Font.Size[size]}
|
||||
color={theme.blue}
|
||||
/>{' '}
|
||||
</>
|
||||
<Feather
|
||||
name='external-link'
|
||||
size={StyleConstants.Font.Size[size]}
|
||||
color={theme.blue}
|
||||
/>
|
||||
) : null}
|
||||
{content || (showFullLink ? href : domain[1])}
|
||||
</Text>
|
||||
|
@ -3,7 +3,7 @@ import { Image, StyleSheet, Text } from 'react-native'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
|
||||
const regexEmoji = new RegExp(/(:[a-z0-9_]+:)/)
|
||||
const regexEmoji = new RegExp(/(:[A-Za-z0-9_]+:)/)
|
||||
|
||||
export interface Props {
|
||||
content: string
|
||||
|
@ -57,7 +57,7 @@ const fireMutation = async ({
|
||||
|
||||
export interface Props {
|
||||
queryKey?: QueryKey.Timeline
|
||||
account: Mastodon.Account
|
||||
account: Pick<Mastodon.Account, 'id' | 'username' | 'acct' | 'url'>
|
||||
setBottomSheetVisible: React.Dispatch<React.SetStateAction<boolean>>
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ import layoutAnimation from '@root/utils/styles/layoutAnimation'
|
||||
export interface Props {
|
||||
route: {
|
||||
params: {
|
||||
account: Mastodon.Account
|
||||
account: Pick<Mastodon.Account, 'id' | 'username' | 'acct' | 'url'>
|
||||
}
|
||||
}
|
||||
navigation: any
|
||||
|
Loading…
x
Reference in New Issue
Block a user