[Glitch] Fix out-of-view post contents being inconsistent with in-view post contents

Port d482211aa6 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2894/head
Claire 2024-11-06 14:30:53 +01:00
parent 3244926565
commit 80378921e6
1 changed files with 4 additions and 2 deletions

View File

@ -583,12 +583,15 @@ class Status extends ImmutablePureComponent {
let prepend, rebloggedByText; let prepend, rebloggedByText;
const matchedFilters = status.get('matched_filters');
if (hidden) { if (hidden) {
return ( return (
<HotKeys handlers={handlers} tabIndex={unfocusable ? null : -1}> <HotKeys handlers={handlers} tabIndex={unfocusable ? null : -1}>
<div ref={this.handleRef} className='status focusable' tabIndex={unfocusable ? null : 0}> <div ref={this.handleRef} className='status focusable' tabIndex={unfocusable ? null : 0}>
<span>{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}</span> <span>{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}</span>
<span>{status.get('content')}</span> {status.get('spoiler_text').length > 0 && (<span>{status.get('spoiler_text')}</span>)}
{isExpanded && <span>{status.get('content')}</span>}
</div> </div>
</HotKeys> </HotKeys>
); );
@ -597,7 +600,6 @@ class Status extends ImmutablePureComponent {
const connectUp = previousId && previousId === status.get('in_reply_to_id'); const connectUp = previousId && previousId === status.get('in_reply_to_id');
const connectToRoot = rootId && rootId === status.get('in_reply_to_id'); const connectToRoot = rootId && rootId === status.get('in_reply_to_id');
const connectReply = nextInReplyToId && nextInReplyToId === status.get('id'); const connectReply = nextInReplyToId && nextInReplyToId === status.get('id');
const matchedFilters = status.get('matched_filters');
if (this.state.forceFilter === undefined ? matchedFilters : this.state.forceFilter) { if (this.state.forceFilter === undefined ? matchedFilters : this.state.forceFilter) {
const minHandlers = this.props.muted ? {} : { const minHandlers = this.props.muted ? {} : {