Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ember-ruby committed Jul 1, 2024
1 parent 3be61c4 commit d8f3610
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/javascript/flavours/blobfox/components/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -529,7 +525,7 @@ class Status extends ImmutablePureComponent {

render () {
const { signedIn } = this.context.identity;
//const { node } = this;
const { node } = this;
const {
handleRef,
parseClick,
Expand Down Expand Up @@ -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;

Expand All @@ -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.
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit d8f3610

Please sign in to comment.