一発で引用の投稿者に飛ぶようにした
This commit is contained in:
parent
3860092d5d
commit
f3c93cfb4f
@ -275,6 +275,15 @@ class Status extends ImmutablePureComponent {
|
|||||||
this.context.router.history.push(`/statuses/${status.getIn(['reblog', 'quote', 'id'], status.getIn(['quote', 'id']))}`);
|
this.context.router.history.push(`/statuses/${status.getIn(['reblog', 'quote', 'id'], status.getIn(['quote', 'id']))}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleQuoteUserClick = () =>{
|
||||||
|
if (!this.context.router) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { status } = this.props;
|
||||||
|
this.location.href(`/@${status.getIn(['account', 'acct'])}`);
|
||||||
|
}
|
||||||
|
|
||||||
handleExpandedToggle = () => {
|
handleExpandedToggle = () => {
|
||||||
this.props.onToggleHidden(this._properStatus());
|
this.props.onToggleHidden(this._properStatus());
|
||||||
};
|
};
|
||||||
@ -644,8 +653,8 @@ class Status extends ImmutablePureComponent {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const identity = (status, account) => (
|
const identity = (status, account, _0, quote = false) => (
|
||||||
<a onClick={quote ? this.handleQuoteClick : this.handleAccountClick} href={`/@${status.getIn(['account', 'acct'])}`} title={status.getIn(['account', 'acct'])} className='status__display-name' target='_blank' rel='noopener noreferrer'>
|
<a onClick={quote ? this.handleQuoteUserClick : this.handleAccountClick} href={`/@${status.getIn(['account', 'acct'])}`} title={status.getIn(['account', 'acct'])} className='status__display-name' rel='noopener noreferrer'>
|
||||||
<div className='status__avatar'>
|
<div className='status__avatar'>
|
||||||
{statusAvatar(status, account)}
|
{statusAvatar(status, account)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,6 +94,15 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||||||
this.context.router.history.push(`/statuses/${status.getIn(['quote', 'id'])}`);
|
this.context.router.history.push(`/statuses/${status.getIn(['quote', 'id'])}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleQuoteUserClick = () =>{
|
||||||
|
if (!this.context.router) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { status } = this.props;
|
||||||
|
this.location.href(`/@${status.getIn(['account', 'acct'])}`);
|
||||||
|
}
|
||||||
|
|
||||||
_measureHeight (heightJustChanged) {
|
_measureHeight (heightJustChanged) {
|
||||||
if (this.props.measureHeight && this.node) {
|
if (this.props.measureHeight && this.node) {
|
||||||
scheduleIdleTask(() => this.node && this.setState({ height: Math.ceil(this.node.scrollHeight) + 1 }));
|
scheduleIdleTask(() => this.node && this.setState({ height: Math.ceil(this.node.scrollHeight) + 1 }));
|
||||||
@ -176,7 +185,7 @@ class DetailedStatus extends ImmutablePureComponent {
|
|||||||
const language = status.getIn(['translation', 'language']) || status.get('language');
|
const language = status.getIn(['translation', 'language']) || status.get('language');
|
||||||
|
|
||||||
const identity = (status, _0, _1, quote = false) => (
|
const identity = (status, _0, _1, quote = false) => (
|
||||||
<a href={`/@${status.getIn(['account', 'acct'])}`} onClick={quote ? this.handleQuoteClick : this.handleAccountClick} data-acct={status.getIn(['account', 'acct'])} className='detailed-status__display-name'>
|
<a href={`/@${status.getIn(['account', 'acct'])}`} onClick={quote ? this.handleQuoteUserClick : this.handleAccountClick} data-acct={status.getIn(['account', 'acct'])} className='detailed-status__display-name'>
|
||||||
<div className='detailed-status__display-avatar'><Avatar account={status.get('account')} size={46} /></div>
|
<div className='detailed-status__display-avatar'><Avatar account={status.get('account')} size={46} /></div>
|
||||||
<DisplayName account={status.get('account')} localDomain={this.props.domain} />
|
<DisplayName account={status.get('account')} localDomain={this.props.domain} />
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user