mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Fixed #51
This commit is contained in:
35
src/components/Timeline/Shared/FullConversation.tsx
Normal file
35
src/components/Timeline/Shared/FullConversation.tsx
Normal 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
|
Reference in New Issue
Block a user