mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-27 09:21:38 +01:00
[Glitch] Fix hidden statuses losing focus
Port 0d13a9cd13
to glitch-soc
Signed-off-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
parent
ab0961fe9a
commit
ed4317b549
1 changed files with 22 additions and 20 deletions
|
@ -486,13 +486,30 @@ class Status extends ImmutablePureComponent {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handlers = {
|
||||||
|
reply: this.handleHotkeyReply,
|
||||||
|
favourite: this.handleHotkeyFavourite,
|
||||||
|
boost: this.handleHotkeyBoost,
|
||||||
|
mention: this.handleHotkeyMention,
|
||||||
|
open: this.handleHotkeyOpen,
|
||||||
|
openProfile: this.handleHotkeyOpenProfile,
|
||||||
|
moveUp: this.handleHotkeyMoveUp,
|
||||||
|
moveDown: this.handleHotkeyMoveDown,
|
||||||
|
toggleSpoiler: this.handleExpandedToggle,
|
||||||
|
bookmark: this.handleHotkeyBookmark,
|
||||||
|
toggleCollapse: this.handleHotkeyCollapse,
|
||||||
|
toggleSensitive: this.handleHotkeyToggleSensitive,
|
||||||
|
};
|
||||||
|
|
||||||
if (hidden) {
|
if (hidden) {
|
||||||
return (
|
return (
|
||||||
<div ref={this.handleRef}>
|
<HotKeys handlers={handlers}>
|
||||||
|
<div ref={this.handleRef} className='status focusable' tabIndex='0'>
|
||||||
{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}
|
{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}
|
||||||
{' '}
|
{' '}
|
||||||
{status.get('content')}
|
{status.get('content')}
|
||||||
</div>
|
</div>
|
||||||
|
</HotKeys>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -628,21 +645,6 @@ class Status extends ImmutablePureComponent {
|
||||||
rebloggedByText = intl.formatMessage({ id: 'status.reblogged_by', defaultMessage: '{name} boosted' }, { name: account.get('acct') });
|
rebloggedByText = intl.formatMessage({ id: 'status.reblogged_by', defaultMessage: '{name} boosted' }, { name: account.get('acct') });
|
||||||
}
|
}
|
||||||
|
|
||||||
const handlers = {
|
|
||||||
reply: this.handleHotkeyReply,
|
|
||||||
favourite: this.handleHotkeyFavourite,
|
|
||||||
boost: this.handleHotkeyBoost,
|
|
||||||
mention: this.handleHotkeyMention,
|
|
||||||
open: this.handleHotkeyOpen,
|
|
||||||
openProfile: this.handleHotkeyOpenProfile,
|
|
||||||
moveUp: this.handleHotkeyMoveUp,
|
|
||||||
moveDown: this.handleHotkeyMoveDown,
|
|
||||||
toggleSpoiler: this.handleExpandedToggle,
|
|
||||||
bookmark: this.handleHotkeyBookmark,
|
|
||||||
toggleCollapse: this.handleHotkeyCollapse,
|
|
||||||
toggleSensitive: this.handleHotkeyToggleSensitive,
|
|
||||||
};
|
|
||||||
|
|
||||||
const computedClass = classNames('status', `status-${status.get('visibility')}`, {
|
const computedClass = classNames('status', `status-${status.get('visibility')}`, {
|
||||||
collapsed: isCollapsed,
|
collapsed: isCollapsed,
|
||||||
'has-background': isCollapsed && background,
|
'has-background': isCollapsed && background,
|
||||||
|
|
Loading…
Reference in a new issue