From d8f3610bdc2fa75571dc3f01630baaa354c1530f Mon Sep 17 00:00:00 2001 From: Ember Date: Mon, 1 Jul 2024 22:33:25 +1000 Subject: [PATCH] . --- .../flavours/blobfox/components/status.jsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/javascript/flavours/blobfox/components/status.jsx b/app/javascript/flavours/blobfox/components/status.jsx index 7c6d3154e92377..e9af23f5afa4eb 100644 --- a/app/javascript/flavours/blobfox/components/status.jsx +++ b/app/javascript/flavours/blobfox/components/status.jsx @@ -293,10 +293,6 @@ class Status extends ImmutablePureComponent { this.setState({ autoCollapsed: true }); } - this.setState({ tootHeight: parseInt(node.clientHeight) }); - - console.log(`raw ${node.clientHeight}, value ${this.state.tootHeight}`) - // Hack to fix timeline jumps when a preview card is fetched this.setState({ showCard: !this.props.muted && !this.props.hidden && this.props.status && this.props.status.get('card') && this.props.settings.get('inline_preview_cards'), @@ -529,7 +525,7 @@ class Status extends ImmutablePureComponent { render () { const { signedIn } = this.context.identity; - //const { node } = this; + const { node } = this; const { handleRef, parseClick, @@ -557,7 +553,7 @@ class Status extends ImmutablePureComponent { history, ...other } = this.props; - const { isCollapsed, tootHeight } = this.state; + const { isCollapsed } = this.state; let background = null; let attachments = null; @@ -572,6 +568,10 @@ class Status extends ImmutablePureComponent { collapsedHeight += 210; } + //this.setState({ tootHeight: parseInt(node.clientHeight) }); + + //console.log(`raw ${node.clientHeight}, value ${this.state.tootHeight}`) + // Depending on user settings, some media are considered as parts of the // contents (affected by CW) while other will be displayed outside of the // CW. @@ -869,7 +869,7 @@ class Status extends ImmutablePureComponent { expanded={isExpanded} collapsed={isCollapsed} autoCollapsed={this.state.autoCollapsed} - tootHeight={tootHeight} + tootHeight={parseInt(node.clientHeight)} collapseHeight={settings.getIn(['collapsed', 'auto', 'height'])} onExpandedToggle={this.handleExpandedToggle} onTranslate={this.handleTranslate}