1
0
mirror of https://github.com/tooot-app/app synced 2025-02-09 00:18:38 +01:00
This commit is contained in:
xmflsct 2022-12-11 01:46:14 +01:00
parent 73eb695cfc
commit e542f0a52e
3 changed files with 5 additions and 3 deletions

View File

@ -125,6 +125,7 @@ const TimelineDefault: React.FC<Props> = ({
spoilerHidden, spoilerHidden,
copiableContent, copiableContent,
highlighted, highlighted,
inThread: queryKey?.[1].page === 'Toot',
disableDetails, disableDetails,
disableOnPress disableOnPress
}} }}

View File

@ -11,7 +11,7 @@ export interface Props {
} }
const TimelineContent: React.FC<Props> = ({ notificationOwnToot = false, setSpoilerExpanded }) => { const TimelineContent: React.FC<Props> = ({ notificationOwnToot = false, setSpoilerExpanded }) => {
const { status, highlighted, disableDetails } = useContext(StatusContext) const { status, highlighted, inThread, disableDetails } = useContext(StatusContext)
if (!status || typeof status.content !== 'string' || !status.content.length) return null if (!status || typeof status.content !== 'string' || !status.content.length) return null
const { t } = useTranslation('componentTimeline') const { t } = useTranslation('componentTimeline')
@ -40,7 +40,7 @@ const TimelineContent: React.FC<Props> = ({ notificationOwnToot = false, setSpoi
mentions={status.mentions} mentions={status.mentions}
tags={status.tags} tags={status.tags}
numberOfLines={ numberOfLines={
instanceAccount.preferences['reading:expand:spoilers'] instanceAccount.preferences['reading:expand:spoilers'] || inThread
? notificationOwnToot ? notificationOwnToot
? 2 ? 2
: 999 : 999
@ -60,7 +60,7 @@ const TimelineContent: React.FC<Props> = ({ notificationOwnToot = false, setSpoi
emojis={status.emojis} emojis={status.emojis}
mentions={status.mentions} mentions={status.mentions}
tags={status.tags} tags={status.tags}
numberOfLines={highlighted ? 999 : notificationOwnToot ? 2 : undefined} numberOfLines={highlighted || inThread ? 999 : notificationOwnToot ? 2 : undefined}
disableDetails={disableDetails} disableDetails={disableDetails}
/> />
)} )}

View File

@ -16,6 +16,7 @@ type ContextType = {
}> }>
highlighted?: boolean highlighted?: boolean
inThread?: boolean
disableDetails?: boolean disableDetails?: boolean
disableOnPress?: boolean disableOnPress?: boolean
} }