about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorkibigo! <marrus-sh@users.noreply.github.com>2017-06-21 20:10:11 -0700
committerbeatrix-bitrot <beatrix.bitrot@gmail.com>2017-06-23 21:50:45 +0000
commit4fe45dda9a046fc18e20c3d3568348b6b5aefa07 (patch)
tree0fafc7eb5cf3be187a1adb63503a823ce5182038 /app/javascript
parent4bd7482a7a010f5f8bdcd53869f871bf93ed1fc0 (diff)
Updates height upon collapsing
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/components/status.js4
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;