mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 04:48:06 +01:00
Fix clicking on avatar/display opening status instead of profile (#2897)
Fix regression from #2895
This commit is contained in:
parent
b7a66c6eac
commit
1ae5f84774
2 changed files with 25 additions and 27 deletions
|
@ -372,7 +372,10 @@ class Status extends ImmutablePureComponent {
|
|||
const { isCollapsed } = this.state;
|
||||
if (!history) return;
|
||||
|
||||
if (e.button === 0 && !(e.ctrlKey || e.altKey || e.metaKey)) {
|
||||
if (e.button !== 0 || e.ctrlKey || e.altKey || e.metaKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isCollapsed) this.setCollapsed(false);
|
||||
else if (e.shiftKey) {
|
||||
this.setCollapsed(true);
|
||||
|
@ -390,8 +393,8 @@ class Status extends ImmutablePureComponent {
|
|||
}
|
||||
history.push(destination);
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
|
||||
handleToggleMediaVisibility = () => {
|
||||
|
|
|
@ -18,15 +18,10 @@ export default class StatusHeader extends PureComponent {
|
|||
parseClick: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
// Handles clicks on account name/image
|
||||
handleClick = (acct, e) => {
|
||||
const { parseClick } = this.props;
|
||||
parseClick(e, `/@${acct}`);
|
||||
};
|
||||
|
||||
handleAccountClick = (e) => {
|
||||
const { status } = this.props;
|
||||
this.handleClick(status.getIn(['account', 'acct']), e);
|
||||
const { status, parseClick } = this.props;
|
||||
parseClick(e, `/@${status.getIn(['account', 'acct'])}`);
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
// Rendering.
|
||||
|
|
Loading…
Reference in a new issue