Verified Commit 0e8a5d0c authored by Haelwenn's avatar Haelwenn

Activate collapsable toots only when spoiler-less

parent e9c96370
......@@ -57,7 +57,12 @@ export default class StatusContent extends React.PureComponent {
link.setAttribute('rel', 'noopener');
}
if (this.props.collapsable && this.state.collapsed === null && node.clientHeight > 200) this.setState({ collapsed: true });
if (
this.props.collapsable
&& this.state.collapsed === null
&& node.clientHeight > 200
&& this.props.status.get('spoiler_text').length === 0
) this.setState({ collapsed: true });
}
componentDidMount () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment