Fix Content Warning and filter states not applying to boosted posts properly (#32887)
This commit is contained in:
		@@ -393,20 +393,6 @@ class Status extends ImmutablePureComponent {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let media, statusAvatar, prepend, rebloggedByText;
 | 
					    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 (
 | 
					 | 
				
			||||||
        <HotKeys handlers={handlers} tabIndex={unfocusable ? null : -1}>
 | 
					 | 
				
			||||||
          <div ref={this.handleRef} className={classNames('status__wrapper', { focusable: !this.props.muted })} tabIndex={unfocusable ? null : 0}>
 | 
					 | 
				
			||||||
            <span>{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}</span>
 | 
					 | 
				
			||||||
            {status.get('spoiler_text').length > 0 && (<span>{status.get('spoiler_text')}</span>)}
 | 
					 | 
				
			||||||
            {expanded && <span>{status.get('content')}</span>}
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </HotKeys>
 | 
					 | 
				
			||||||
      );
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    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');
 | 
				
			||||||
@@ -446,6 +432,21 @@ class Status extends ImmutablePureComponent {
 | 
				
			|||||||
      );
 | 
					      );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const matchedFilters = status.get('matched_filters');
 | 
				
			||||||
 | 
					    const expanded = (!matchedFilters || this.state.showDespiteFilter) && (!status.get('hidden') || status.get('spoiler_text').length === 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (hidden) {
 | 
				
			||||||
 | 
					      return (
 | 
				
			||||||
 | 
					        <HotKeys handlers={handlers} tabIndex={unfocusable ? null : -1}>
 | 
				
			||||||
 | 
					          <div ref={this.handleRef} className={classNames('status__wrapper', { focusable: !this.props.muted })} tabIndex={unfocusable ? null : 0}>
 | 
				
			||||||
 | 
					            <span>{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}</span>
 | 
				
			||||||
 | 
					            {status.get('spoiler_text').length > 0 && (<span>{status.get('spoiler_text')}</span>)}
 | 
				
			||||||
 | 
					            {expanded && <span>{status.get('content')}</span>}
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </HotKeys>
 | 
				
			||||||
 | 
					      );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (pictureInPicture.get('inUse')) {
 | 
					    if (pictureInPicture.get('inUse')) {
 | 
				
			||||||
      media = <PictureInPicturePlaceholder aspectRatio={this.getAttachmentAspectRatio()} />;
 | 
					      media = <PictureInPicturePlaceholder aspectRatio={this.getAttachmentAspectRatio()} />;
 | 
				
			||||||
    } else if (status.get('media_attachments').size > 0) {
 | 
					    } else if (status.get('media_attachments').size > 0) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user