[Glitch] Change display of quote posts to strip fallback link and preview cards

Port 02ac18da51 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire
2025-05-23 08:53:04 +02:00
parent cac981662e
commit d28a62f900
3 changed files with 20 additions and 3 deletions

View File

@@ -621,7 +621,7 @@ class Status extends ImmutablePureComponent {
);
mediaIcons.push('video-camera');
}
} else if (status.get('card') && settings.get('inline_preview_cards') && !this.props.muted) {
} else if (status.get('card') && settings.get('inline_preview_cards') && !this.props.muted && !status.get('quote')) {
media.push(
<Card
onOpenMedia={this.handleOpenMedia}
@@ -687,7 +687,17 @@ class Status extends ImmutablePureComponent {
{!skipPrepend && prepend}
<div
className={classNames('status', `status-${status.get('visibility')}`, { 'status-reply': !!status.get('in_reply_to_id'), 'status--in-thread': !!rootId, 'status--first-in-thread': previousId && (!connectUp || connectToRoot), muted: this.props.muted, 'status--is-quote': isQuotedPost })}
className={
classNames('status', `status-${status.get('visibility')}`,
{
'status-reply': !!status.get('in_reply_to_id'),
'status--in-thread': !!rootId,
'status--first-in-thread': previousId && (!connectUp || connectToRoot),
muted: this.props.muted,
'status--is-quote': isQuotedPost,
'status--has-quote': !!status.get('quote'),
})
}
data-id={status.get('id')}
>
{(connectReply || connectUp || connectToRoot) && <div className={classNames('status__line', { 'status__line--full': connectReply, 'status__line--first': !status.get('in_reply_to_id') && !connectToRoot })} />}

View File

@@ -266,7 +266,7 @@ export const DetailedStatus: React.FC<{
);
mediaIcons.push('video-camera');
}
} else if (status.get('card')) {
} else if (status.get('card') && !status.get('quote')) {
media = (
<Card
sensitive={status.get('sensitive')}
@@ -356,6 +356,9 @@ export const DetailedStatus: React.FC<{
className={classNames(
'detailed-status',
`detailed-status-${status.get('visibility')}`,
{
'status--has-quote': !!status.get('quote'),
},
)}
data-status-by={status.getIn(['account', 'acct'])}
>

View File

@@ -1480,6 +1480,10 @@ body > [data-popper-placement] {
}
}
.status--has-quote .quote-inline {
display: none;
}
.status {
padding: 10px 14px; // glitch: reduced padding
min-height: 54px;