From d482211aa6293f78f161cbc7149e829966cd8e3a Mon Sep 17 00:00:00 2001 From: Claire Date: Wed, 6 Nov 2024 14:30:53 +0100 Subject: [PATCH] Fix out-of-view post contents being inconsistent with in-view post contents (#32778) --- app/javascript/mastodon/components/status.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index 4792136368..96ccf3aad4 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -393,13 +393,16 @@ class Status extends ImmutablePureComponent { }; let media, statusAvatar, prepend, rebloggedByText; + const matchedFilters = status.get('matched_filters'); + const expanded = (!matchedFilters || this.state.showDespiteFilter) && (!status.get('hidden') || status.get('spoiler_text').length === 0); if (hidden) { return (
{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])} - {status.get('content')} + {status.get('spoiler_text').length > 0 && ({status.get('spoiler_text')})} + {expanded && {status.get('content')}}
); @@ -408,7 +411,6 @@ class Status extends ImmutablePureComponent { const connectUp = previousId && previousId === status.get('in_reply_to_id'); const connectToRoot = rootId && rootId === status.get('in_reply_to_id'); const connectReply = nextInReplyToId && nextInReplyToId === status.get('id'); - const matchedFilters = status.get('matched_filters'); if (featured) { prepend = ( @@ -538,7 +540,6 @@ class Status extends ImmutablePureComponent { } const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status); - const expanded = (!matchedFilters || this.state.showDespiteFilter) && (!status.get('hidden') || status.get('spoiler_text').length === 0); return (