diff options
author | Gô Shoemake <marrus-sh@users.noreply.github.com> | 2017-06-23 18:01:29 -0700 |
---|---|---|
committer | kibigo! <marrus-sh@users.noreply.github.com> | 2017-06-23 18:23:26 -0700 |
commit | 67adbcc60cee7915f8e59256a0eaf6d42a03a559 (patch) | |
tree | 1a04ce33e2f9601bf08c5859e290f7d7681683b0 /app | |
parent | 453b9c6e7e1d5f8e8f5818ada392b9f020ba8be3 (diff) |
Reblog support for collapsed toots
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/components/status.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index af158ed24..d795ff000 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -20,8 +20,7 @@ const messages = defineMessages({ uncollapse: { id: 'status.uncollapse', defaultMessage: 'Uncollapse' }, }); -@injectIntl -export default class Status extends ImmutablePureComponent { +class StatusUnextended extends ImmutablePureComponent { static contextTypes = { router: PropTypes.object, @@ -104,7 +103,7 @@ export default class Status extends ImmutablePureComponent { this.handleIntersection ); - if (node.clientHeight > 400) this.setState({ isCollapsed: true }); + if (node.clientHeight > 400 && !(this.props.status.get('reblog', null) !== null && typeof this.props.status.get('reblog') === 'object')) this.setState({ isCollapsed: true }); this.componentMounted = true; } @@ -260,9 +259,12 @@ export default class Status extends ImmutablePureComponent { {isCollapsed ? null : media} - {isCollapsed ? null : <StatusActionBar {...this.props} />} + {isCollapsed ? null : <StatusActionBar status={status} account={account} {...other} />} </div> ); } } + +const Status = injectIntl(StatusUnextended); +export default Status; |