mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-18 07:38:42 +00:00
Fix CW unfolding not triggering re-layout in public hashtag page
This commit is contained in:
parent
3ce34ce7a2
commit
1a70fca168
|
@ -17,6 +17,7 @@ export default class StatusContent extends React.PureComponent {
|
|||
mediaIcon: PropTypes.string,
|
||||
parseClick: PropTypes.func,
|
||||
disabled: PropTypes.bool,
|
||||
onUpdate: PropTypes.func,
|
||||
};
|
||||
|
||||
state = {
|
||||
|
@ -62,6 +63,7 @@ export default class StatusContent extends React.PureComponent {
|
|||
|
||||
componentDidUpdate () {
|
||||
this._updateStatusLinks();
|
||||
if (this.props.onUpdate) this.props.onUpdate();
|
||||
}
|
||||
|
||||
onLinkClick = (e) => {
|
||||
|
|
|
@ -79,6 +79,10 @@ export default class DetailedStatus extends ImmutablePureComponent {
|
|||
this._measureHeight(prevState.height !== this.state.height);
|
||||
}
|
||||
|
||||
handleChildUpdate = () => {
|
||||
this._measureHeight();
|
||||
}
|
||||
|
||||
handleModalLink = e => {
|
||||
e.preventDefault();
|
||||
|
||||
|
@ -218,6 +222,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
|
|||
collapsed={false}
|
||||
onExpandedToggle={onToggleHidden}
|
||||
parseClick={this.parseClick}
|
||||
onUpdate={this.handleChildUpdate}
|
||||
/>
|
||||
|
||||
<div className='detailed-status__meta'>
|
||||
|
|
Loading…
Reference in a new issue