0
0
Fork 0

Remove hashtags from the last line of a status if it only contains hashtags (#26499)

This commit is contained in:
Renaud Chaput 2023-08-21 19:39:01 +02:00 committed by GitHub
parent ac0eb0533e
commit 061fd66ee6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 428 additions and 56 deletions

View file

@ -10,7 +10,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import { AnimatedNumber } from 'mastodon/components/animated_number';
import EditedTimestamp from 'mastodon/components/edited_timestamp';
import { HashtagBar } from 'mastodon/components/hashtag_bar';
import { getHashtagBarForStatus } from 'mastodon/components/hashtag_bar';
import { Icon } from 'mastodon/components/icon';
import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
@ -292,6 +292,8 @@ class DetailedStatus extends ImmutablePureComponent {
);
}
const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status);
return (
<div style={outerStyle}>
<div ref={this.setRef} className={classNames('detailed-status', { compact })}>
@ -311,11 +313,12 @@ class DetailedStatus extends ImmutablePureComponent {
expanded={!status.get('hidden')}
onExpandedToggle={this.handleExpandedToggle}
onTranslate={this.handleTranslate}
{...statusContentProps}
/>
{media}
<HashtagBar hashtags={status.get('tags')} text={status.get('content')} />
{hashtagBar}
<div className='detailed-status__meta'>
<a className='detailed-status__datetime' href={`/@${status.getIn(['account', 'acct'])}/${status.get('id')}`} target='_blank' rel='noopener noreferrer'>