mirror of
https://github.com/tooot-app/app
synced 2025-02-02 11:36:56 +01:00
Fixed #534
This commit is contained in:
parent
73eb695cfc
commit
e542f0a52e
@ -125,6 +125,7 @@ const TimelineDefault: React.FC<Props> = ({
|
||||
spoilerHidden,
|
||||
copiableContent,
|
||||
highlighted,
|
||||
inThread: queryKey?.[1].page === 'Toot',
|
||||
disableDetails,
|
||||
disableOnPress
|
||||
}}
|
||||
|
@ -11,7 +11,7 @@ export interface Props {
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
const { t } = useTranslation('componentTimeline')
|
||||
@ -40,7 +40,7 @@ const TimelineContent: React.FC<Props> = ({ notificationOwnToot = false, setSpoi
|
||||
mentions={status.mentions}
|
||||
tags={status.tags}
|
||||
numberOfLines={
|
||||
instanceAccount.preferences['reading:expand:spoilers']
|
||||
instanceAccount.preferences['reading:expand:spoilers'] || inThread
|
||||
? notificationOwnToot
|
||||
? 2
|
||||
: 999
|
||||
@ -60,7 +60,7 @@ const TimelineContent: React.FC<Props> = ({ notificationOwnToot = false, setSpoi
|
||||
emojis={status.emojis}
|
||||
mentions={status.mentions}
|
||||
tags={status.tags}
|
||||
numberOfLines={highlighted ? 999 : notificationOwnToot ? 2 : undefined}
|
||||
numberOfLines={highlighted || inThread ? 999 : notificationOwnToot ? 2 : undefined}
|
||||
disableDetails={disableDetails}
|
||||
/>
|
||||
)}
|
||||
|
@ -16,6 +16,7 @@ type ContextType = {
|
||||
}>
|
||||
|
||||
highlighted?: boolean
|
||||
inThread?: boolean
|
||||
disableDetails?: boolean
|
||||
disableOnPress?: boolean
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user