From 32574a7e3c44f3049e4db4a6635db1eeceafaa54 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Wed, 21 Jun 2017 20:10:11 -0700 Subject: [PATCH] Updates height upon collapsing --- app/javascript/mastodon/components/status.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index e02169c579..4c4b89c1b1 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -86,6 +86,10 @@ export default class Status extends ImmutablePureComponent { return super.shouldComponentUpdate(nextProps, nextState); } + componentDidUpdate (prevProps, prevState) { + if (prevState.isCollapsed !== this.state.isCollapsed) this.saveHeight(); + } + componentDidMount () { const node = this.node;