Skip to content

Commit

Permalink
Change the hashtag bar to be hidden when there is a CW and the post i…
Browse files Browse the repository at this point in the history
…s not expanded (mastodon#26615)
  • Loading branch information
renchap authored and vmstan committed Jan 5, 2024
1 parent 556ac8a commit 4d361e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/javascript/mastodon/components/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ class Status extends ImmutablePureComponent {
const visibilityIcon = visibilityIconInfo[status.get('visibility')];

const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status);
const expanded = !status.get('hidden')

return (
<HotKeys handlers={handlers}>
Expand Down Expand Up @@ -574,7 +575,7 @@ class Status extends ImmutablePureComponent {
<StatusContent
status={status}
onClick={this.handleClick}
expanded={!status.get('hidden')}
expanded={expanded}
onExpandedToggle={this.handleExpandedToggle}
onTranslate={this.handleTranslate}
collapsible
Expand All @@ -584,7 +585,7 @@ class Status extends ImmutablePureComponent {

{media}

{hashtagBar}
{expanded && hashtagBar}

<StatusActionBar scrollKey={scrollKey} status={status} account={account} onFilter={matchedFilters ? this.handleFilterClick : null} {...other} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ class DetailedStatus extends ImmutablePureComponent {
}

const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status);
const expanded = !status.get('hidden')

return (
<div style={outerStyle}>
Expand All @@ -318,7 +319,7 @@ class DetailedStatus extends ImmutablePureComponent {

{media}

{hashtagBar}
{expanded && hashtagBar}

<div className='detailed-status__meta'>
<a className='detailed-status__datetime' href={`/@${status.getIn(['account', 'acct'])}/${status.get('id')}`} target='_blank' rel='noopener noreferrer'>
Expand Down

0 comments on commit 4d361e6

Please sign in to comment.