Skip to content

Commit

Permalink
j
Browse files Browse the repository at this point in the history
  • Loading branch information
Ember-ruby committed Jun 30, 2024
1 parent d3fba40 commit d4df8e6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/javascript/flavours/blobfox/components/status_content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,10 @@ class StatusContent extends PureComponent {
intl,
statusContent,
} = this.props;
const { collapsed } = this.state;

let collapse = false

collapse = this.props.collapsed

const hidden = this.props.onExpandedToggle ? !this.props.expanded : this.state.hidden;
const contentLocale = intl.locale.replace(/[_-].*/, '');
Expand Down Expand Up @@ -423,8 +426,7 @@ class StatusContent extends PureComponent {
}

return (
<div className={classNames} tabIndex={0} onMouseDown={this.handleMouseDown} onMouseUp={this.handleMouseUp} style={{ height: `${collapsedHeight}px` }}>
<div>{collapsed}</div>
<div className={classNames} tabIndex={0} onMouseDown={this.handleMouseDown} onMouseUp={this.handleMouseUp} style={collapse ? { height: `${collapsedHeight}px` } : null}>
<p
style={{ marginBottom: hidden && status.get('mentions').isEmpty() ? '0px' : null }}
>
Expand Down Expand Up @@ -462,7 +464,7 @@ class StatusContent extends PureComponent {
onMouseDown={this.handleMouseDown}
onMouseUp={this.handleMouseUp}
tabIndex={0}
style={collapsed && collapsedHeight ? { height: `${collapsedHeight}px` } : null}
style={collapse ? { height: `${collapsedHeight}px` } : null}
>
<div
ref={this.setContentsRef}
Expand All @@ -484,7 +486,7 @@ class StatusContent extends PureComponent {
<div
className='status__content'
tabIndex={0}
style={collapsed && collapsedHeight ? { height: `${collapsedHeight}px` } : null}
style={collapse ? { height: `${collapsedHeight}px` } : null}
>
<div
ref={this.setContentsRef}
Expand Down

0 comments on commit d4df8e6

Please sign in to comment.