1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2021-03-14 01:35:38 +01:00
parent 5fe6cd59f9
commit b21f1b5a0e
5 changed files with 51 additions and 3 deletions

View File

@ -0,0 +1,35 @@
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { Text } from 'react-native'
export interface Props {
status: Mastodon.Status
}
const TimelineFullConversation = React.memo(
({ status }: Props) => {
const { t } = useTranslation('componentTimeline')
const { theme } = useTheme()
return status.in_reply_to_account_id &&
(status.mentions.length === 0 ||
status.mentions.filter(
mention => mention.id !== status.in_reply_to_account_id
).length) ? (
<Text
style={{
...StyleConstants.FontStyle.M,
color: theme.blue,
marginTop: StyleConstants.Font.Size.M / 2
}}
>
{t('shared.fullConversation')}
</Text>
) : null
},
() => true
)
export default TimelineFullConversation