diff --git a/src/components/Timeline/Notifications.tsx b/src/components/Timeline/Notifications.tsx index 04204965..4d7b69a6 100644 --- a/src/components/Timeline/Notifications.tsx +++ b/src/components/Timeline/Notifications.tsx @@ -108,7 +108,10 @@ const TimelineNotifications: React.FC = ({ paddingLeft: highlighted ? 0 : StyleConstants.Avatar.M + StyleConstants.Spacing.S }} > - + diff --git a/src/components/Timeline/Shared/Content.tsx b/src/components/Timeline/Shared/Content.tsx index 5e2578a1..0c187cee 100644 --- a/src/components/Timeline/Shared/Content.tsx +++ b/src/components/Timeline/Shared/Content.tsx @@ -6,10 +6,11 @@ import { useSelector } from 'react-redux' import StatusContext from './Context' export interface Props { + notificationOwnToot?: boolean setSpoilerExpanded?: React.Dispatch> } -const TimelineContent: React.FC = ({ setSpoilerExpanded }) => { +const TimelineContent: React.FC = ({ notificationOwnToot = false, setSpoilerExpanded }) => { const { status, highlighted, disableDetails } = useContext(StatusContext) if (!status || typeof status.content !== 'string' || !status.content.length) return null @@ -38,7 +39,13 @@ const TimelineContent: React.FC = ({ setSpoilerExpanded }) => { emojis={status.emojis} mentions={status.mentions} tags={status.tags} - numberOfLines={instanceAccount.preferences['reading:expand:spoilers'] ? 999 : 1} + numberOfLines={ + instanceAccount.preferences['reading:expand:spoilers'] + ? notificationOwnToot + ? 2 + : 999 + : 1 + } expandHint={t('shared.content.expandHint')} setSpoilerExpanded={setSpoilerExpanded} highlighted={highlighted} @@ -53,7 +60,7 @@ const TimelineContent: React.FC = ({ setSpoilerExpanded }) => { emojis={status.emojis} mentions={status.mentions} tags={status.tags} - numberOfLines={highlighted ? 999 : undefined} + numberOfLines={highlighted ? 999 : notificationOwnToot ? 2 : undefined} disableDetails={disableDetails} /> )}