diff options
author | kibigo! <marrus-sh@users.noreply.github.com> | 2017-06-21 20:10:11 -0700 |
---|---|---|
committer | beatrix-bitrot <beatrix.bitrot@gmail.com> | 2017-06-23 21:50:45 +0000 |
commit | 4fe45dda9a046fc18e20c3d3568348b6b5aefa07 (patch) | |
tree | 0fafc7eb5cf3be187a1adb63503a823ce5182038 | |
parent | 4bd7482a7a010f5f8bdcd53869f871bf93ed1fc0 (diff) |
Updates height upon collapsing
-rw-r--r-- | app/javascript/mastodon/components/status.js | 4 |
1 files changed, 4 insertions, 0 deletions
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; |