mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 18:02:59 +01:00
parent
ba42dc35cc
commit
0d13a9cd13
1 changed files with 19 additions and 17 deletions
|
@ -278,12 +278,27 @@ class Status extends ImmutablePureComponent {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handlers = this.props.muted ? {} : {
|
||||||
|
reply: this.handleHotkeyReply,
|
||||||
|
favourite: this.handleHotkeyFavourite,
|
||||||
|
boost: this.handleHotkeyBoost,
|
||||||
|
mention: this.handleHotkeyMention,
|
||||||
|
open: this.handleHotkeyOpen,
|
||||||
|
openProfile: this.handleHotkeyOpenProfile,
|
||||||
|
moveUp: this.handleHotkeyMoveUp,
|
||||||
|
moveDown: this.handleHotkeyMoveDown,
|
||||||
|
toggleHidden: this.handleHotkeyToggleHidden,
|
||||||
|
toggleSensitive: this.handleHotkeyToggleSensitive,
|
||||||
|
};
|
||||||
|
|
||||||
if (hidden) {
|
if (hidden) {
|
||||||
return (
|
return (
|
||||||
<div ref={this.handleRef}>
|
<HotKeys handlers={handlers}>
|
||||||
{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}
|
<div ref={this.handleRef} className={classNames('status__wrapper', { focusable: !this.props.muted })} tabIndex='0'>
|
||||||
{status.get('content')}
|
{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}
|
||||||
</div>
|
{status.get('content')}
|
||||||
|
</div>
|
||||||
|
</HotKeys>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -394,19 +409,6 @@ class Status extends ImmutablePureComponent {
|
||||||
statusAvatar = <AvatarOverlay account={status.get('account')} friend={account} />;
|
statusAvatar = <AvatarOverlay account={status.get('account')} friend={account} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlers = this.props.muted ? {} : {
|
|
||||||
reply: this.handleHotkeyReply,
|
|
||||||
favourite: this.handleHotkeyFavourite,
|
|
||||||
boost: this.handleHotkeyBoost,
|
|
||||||
mention: this.handleHotkeyMention,
|
|
||||||
open: this.handleHotkeyOpen,
|
|
||||||
openProfile: this.handleHotkeyOpenProfile,
|
|
||||||
moveUp: this.handleHotkeyMoveUp,
|
|
||||||
moveDown: this.handleHotkeyMoveDown,
|
|
||||||
toggleHidden: this.handleHotkeyToggleHidden,
|
|
||||||
toggleSensitive: this.handleHotkeyToggleSensitive,
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HotKeys handlers={handlers}>
|
<HotKeys handlers={handlers}>
|
||||||
<div className={classNames('status__wrapper', `status__wrapper-${status.get('visibility')}`, { 'status__wrapper-reply': !!status.get('in_reply_to_id'), read: unread === false, focusable: !this.props.muted })} tabIndex={this.props.muted ? null : 0} data-featured={featured ? 'true' : null} aria-label={textForScreenReader(intl, status, rebloggedByText)} ref={this.handleRef}>
|
<div className={classNames('status__wrapper', `status__wrapper-${status.get('visibility')}`, { 'status__wrapper-reply': !!status.get('in_reply_to_id'), read: unread === false, focusable: !this.props.muted })} tabIndex={this.props.muted ? null : 0} data-featured={featured ? 'true' : null} aria-label={textForScreenReader(intl, status, rebloggedByText)} ref={this.handleRef}>
|
||||||
|
|
Loading…
Reference in a new issue