From e6f5e08acb65c0947da28312289af770e79a5d69 Mon Sep 17 00:00:00 2001 From: Ember Date: Mon, 1 Jul 2024 18:03:18 +1000 Subject: [PATCH] . --- .../flavours/blobfox/components/status_content.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/javascript/flavours/blobfox/components/status_content.jsx b/app/javascript/flavours/blobfox/components/status_content.jsx index 78db6ad148f5a5..3d55f8884388dd 100644 --- a/app/javascript/flavours/blobfox/components/status_content.jsx +++ b/app/javascript/flavours/blobfox/components/status_content.jsx @@ -160,7 +160,7 @@ class StatusContent extends PureComponent { hidden: true, collapsed: false, autoCollapsed: false, - collapsedHeight: 0, + collapsedHeight: null, clientHeight: null, }; @@ -281,12 +281,12 @@ class StatusContent extends PureComponent { if (node === undefined) return; - let tempCollapsedHeight = 0; + //let tempCollapsedHeight = 0; // this.setState({ collapseHeight: true }); - if (this.props.collapsed && !this.props.autoCollapsed && collapseHeight >= 40) { - tempCollapsedHeight = ( + if (this.props.autoCollapsed && collapseHeight >= 40) { + let tempCollapsedHeight = ( parseInt(collapseHeight) ) @@ -300,8 +300,8 @@ class StatusContent extends PureComponent { tempCollapsedHeight = 600; - this.setState({ collapsedHeight: parseInt(tempCollapsedHeight) }) - } else if (this.props.autoCollapsed || collapseHeight < 40) { + this.setState({ collapsedHeight: tempCollapsedHeight }) + } else if (!this.props.autoCollapsed || collapseHeight < 40) { this.setState({ collapsedHeight: 40 }) } }