Remove hashtags from the last line of a status if it only contains hashtags (#26499)
This commit is contained in:
parent
ac0eb0533e
commit
061fd66ee6
6 changed files with 428 additions and 56 deletions
|
@ -22,7 +22,7 @@ import { displayMedia } from '../initial_state';
|
|||
import { Avatar } from './avatar';
|
||||
import { AvatarOverlay } from './avatar_overlay';
|
||||
import { DisplayName } from './display_name';
|
||||
import { HashtagBar } from './hashtag_bar';
|
||||
import { getHashtagBarForStatus } from './hashtag_bar';
|
||||
import { RelativeTimestamp } from './relative_timestamp';
|
||||
import StatusActionBar from './status_action_bar';
|
||||
import StatusContent from './status_content';
|
||||
|
@ -545,6 +545,8 @@ class Status extends ImmutablePureComponent {
|
|||
|
||||
const visibilityIcon = visibilityIconInfo[status.get('visibility')];
|
||||
|
||||
const {statusContentProps, hashtagBar} = getHashtagBarForStatus(status);
|
||||
|
||||
return (
|
||||
<HotKeys handlers={handlers}>
|
||||
<div className={classNames('status__wrapper', `status__wrapper-${status.get('visibility')}`, { 'status__wrapper-reply': !!status.get('in_reply_to_id'), unread, focusable: !this.props.muted })} tabIndex={this.props.muted ? null : 0} data-featured={featured ? 'true' : null} aria-label={textForScreenReader(intl, status, rebloggedByText)} ref={this.handleRef}>
|
||||
|
@ -577,11 +579,12 @@ class Status extends ImmutablePureComponent {
|
|||
onTranslate={this.handleTranslate}
|
||||
collapsible
|
||||
onCollapsedToggle={this.handleCollapsedToggle}
|
||||
{...statusContentProps}
|
||||
/>
|
||||
|
||||
{media}
|
||||
|
||||
<HashtagBar hashtags={status.get('tags')} text={status.get('content')} />
|
||||
{hashtagBar}
|
||||
|
||||
<StatusActionBar scrollKey={scrollKey} status={status} account={account} onFilter={matchedFilters ? this.handleFilterClick : null} {...other} />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue