From 4fe45dda9a046fc18e20c3d3568348b6b5aefa07 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 e02169c57..4c4b89c1b 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;