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

Suppress spoiler for easier reading

As spoiler is default expanded now in thread
This commit is contained in:
xmflsct
2023-01-29 19:27:15 +01:00
parent aba239188f
commit 83cd5d4eb0
6 changed files with 24 additions and 8 deletions

View File

@ -14,7 +14,7 @@ export interface Props {
}
const TimelineContent: React.FC<Props> = ({ notificationOwnToot = false, setSpoilerExpanded }) => {
const { status, highlighted, inThread } = useContext(StatusContext)
const { status, highlighted, suppressSpoiler, inThread } = useContext(StatusContext)
if (!status || typeof status.content !== 'string' || !status.content.length) return null
const { colors } = useTheme()
@ -35,6 +35,7 @@ const TimelineContent: React.FC<Props> = ({ notificationOwnToot = false, setSpoi
size={highlighted ? 'L' : 'M'}
adaptiveSize
numberOfLines={999}
color={suppressSpoiler ? colors.disabled : undefined}
/>
{inThread ? (
<CustomText

View File

@ -15,6 +15,7 @@ type StatusContextType = {
excludeMentions?: React.MutableRefObject<Mastodon.Mention[]>
highlighted?: boolean
suppressSpoiler?: boolean
inThread?: boolean
disableDetails?: boolean
disableOnPress?: boolean