0
0
Fork 0

Add "Show thread" link to self-replies (#9228)

Fix #4716
This commit is contained in:
Eugen Rochko 2018-11-08 21:08:57 +01:00 committed by GitHub
parent 3ddb460449
commit 5cbf6cf3ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 6 deletions

View file

@ -67,6 +67,7 @@ class Status extends ImmutablePureComponent {
unread: PropTypes.bool,
onMoveUp: PropTypes.func,
onMoveDown: PropTypes.func,
showThread: PropTypes.bool,
};
// Avoid checking props that are functions (and whose equality will always
@ -168,7 +169,7 @@ class Status extends ImmutablePureComponent {
let media = null;
let statusAvatar, prepend, rebloggedByText;
const { intl, hidden, featured, otherAccounts, unread } = this.props;
const { intl, hidden, featured, otherAccounts, unread, showThread } = this.props;
let { status, account, ...other } = this.props;
@ -309,6 +310,12 @@ class Status extends ImmutablePureComponent {
{media}
{showThread && status.get('in_reply_to_id') && status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) && (
<button className='status__content__read-more-button' onClick={this.handleClick}>
<FormattedMessage id='status.show_thread' defaultMessage='Show thread' />
</button>
)}
<StatusActionBar status={status} account={account} {...other} />
</div>
</div>