1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Update branching

This commit is contained in:
Zhiyuan Zheng
2021-03-14 21:48:28 +01:00
parent b21f1b5a0e
commit a23f98842f
13 changed files with 54 additions and 128 deletions

View File

@ -83,7 +83,7 @@ const renderNode = ({
<Text
key={index}
style={{
color: accountIndex !== -1 ? theme.blue : undefined,
color: accountIndex !== -1 ? theme.blue : theme.primary,
fontSize: adaptedFontsize,
lineHeight: adaptedLineheight
}}

View File

@ -125,7 +125,7 @@ const TimelineDefault: React.FC<Props> = ({
{!disableDetails && actualStatus.card && (
<TimelineCard card={actualStatus.card} />
)}
<TimelineFullConversation status={actualStatus} />
<TimelineFullConversation queryKey={queryKey} status={actualStatus} />
</View>
{queryKey && !disableDetails && (

View File

@ -121,7 +121,10 @@ const TimelineNotifications: React.FC<Props> = ({
{notification.status.card && (
<TimelineCard card={notification.status.card} />
)}
<TimelineFullConversation status={notification.status} />
<TimelineFullConversation
queryKey={queryKey}
status={notification.status}
/>
</View>
) : null}
</View>

View File

@ -1,3 +1,4 @@
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React from 'react'
@ -5,15 +6,18 @@ import { useTranslation } from 'react-i18next'
import { Text } from 'react-native'
export interface Props {
queryKey?: QueryKeyTimeline
status: Mastodon.Status
}
const TimelineFullConversation = React.memo(
({ status }: Props) => {
({ queryKey, status }: Props) => {
const { t } = useTranslation('componentTimeline')
const { theme } = useTheme()
return status.in_reply_to_account_id &&
return queryKey &&
queryKey[1].page !== 'Toot' &&
status.in_reply_to_account_id &&
(status.mentions.length === 0 ||
status.mentions.filter(
mention => mention.id !== status.in_reply_to_account_id