From 47e1b2f2c3a544a27fa694ca8b964dda904074d0 Mon Sep 17 00:00:00 2001 From: Ember Date: Sun, 30 Jun 2024 23:48:53 +1000 Subject: [PATCH] aaa --- app/javascript/flavours/blobfox/components/status.jsx | 2 +- .../flavours/blobfox/components/status_content.jsx | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/javascript/flavours/blobfox/components/status.jsx b/app/javascript/flavours/blobfox/components/status.jsx index 3a6c92482237f4..b3c6a5c5c51b5c 100644 --- a/app/javascript/flavours/blobfox/components/status.jsx +++ b/app/javascript/flavours/blobfox/components/status.jsx @@ -851,7 +851,7 @@ class Status extends ImmutablePureComponent { mediaIcons={contentMediaIcons} expanded={isExpanded} collapsed={isCollapsed} - toggleCollapse={this.handleHotkeyCollapse} + collapseHeight={settings.getIn(['collapsed', 'auto', 'height'])} onExpandedToggle={this.handleExpandedToggle} onTranslate={this.handleTranslate} parseClick={parseClick} diff --git a/app/javascript/flavours/blobfox/components/status_content.jsx b/app/javascript/flavours/blobfox/components/status_content.jsx index d66880982cf26d..15d2d52a4d7071 100644 --- a/app/javascript/flavours/blobfox/components/status_content.jsx +++ b/app/javascript/flavours/blobfox/components/status_content.jsx @@ -156,6 +156,7 @@ class StatusContent extends PureComponent { state = { hidden: true, + collapsed: false, }; _updateStatusLinks () { @@ -333,9 +334,8 @@ class StatusContent extends PureComponent { media, extraMedia, mediaIcons, - collapsed, + collapseHeight, muted, - settings, parseClick, disabled, tagLinks, @@ -343,6 +343,7 @@ class StatusContent extends PureComponent { intl, statusContent, } = this.props; + const { collapsed } = this.state; const hidden = this.props.onExpandedToggle ? !this.props.expanded : this.state.hidden; const contentLocale = intl.locale.replace(/[_-].*/, ''); @@ -361,12 +362,10 @@ class StatusContent extends PureComponent { ); - let collapsedHeight = null; - - const autoCollapseSettings = settings.getIn(['collapsed', 'auto']); + let collapsedHeight = 0; collapsedHeight = ( - parseInt(autoCollapseSettings.get('height')) + parseInt(collapseHeight) ) if (status.get('media_attachments').size && !muted) {