Fix CW unfolding not triggering re-layout in public hashtag page
parent
d55233da9a
commit
a9078c18eb
|
@ -17,6 +17,7 @@ export default class StatusContent extends React.PureComponent {
|
||||||
mediaIcon: PropTypes.string,
|
mediaIcon: PropTypes.string,
|
||||||
parseClick: PropTypes.func,
|
parseClick: PropTypes.func,
|
||||||
disabled: PropTypes.bool,
|
disabled: PropTypes.bool,
|
||||||
|
onUpdate: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
|
@ -62,6 +63,7 @@ export default class StatusContent extends React.PureComponent {
|
||||||
|
|
||||||
componentDidUpdate () {
|
componentDidUpdate () {
|
||||||
this._updateStatusLinks();
|
this._updateStatusLinks();
|
||||||
|
if (this.props.onUpdate) this.props.onUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
onLinkClick = (e) => {
|
onLinkClick = (e) => {
|
||||||
|
|
|
@ -79,6 +79,10 @@ export default class DetailedStatus extends ImmutablePureComponent {
|
||||||
this._measureHeight(prevState.height !== this.state.height);
|
this._measureHeight(prevState.height !== this.state.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleChildUpdate = () => {
|
||||||
|
this._measureHeight();
|
||||||
|
}
|
||||||
|
|
||||||
handleModalLink = e => {
|
handleModalLink = e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
@ -218,6 +222,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
|
||||||
collapsed={false}
|
collapsed={false}
|
||||||
onExpandedToggle={onToggleHidden}
|
onExpandedToggle={onToggleHidden}
|
||||||
parseClick={this.parseClick}
|
parseClick={this.parseClick}
|
||||||
|
onUpdate={this.handleChildUpdate}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className='detailed-status__meta'>
|
<div className='detailed-status__meta'>
|
||||||
|
|
Loading…
Reference in New Issue