about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/video/index.js
diff options
context:
space:
mode:
authorash lea <ashlea@protonmail.com>2019-03-10 15:34:51 -0400
committerThibG <thib@sitedethib.com>2019-03-11 12:14:45 +0100
commitf534f4869ecb52cb48f3e68e42752d8f81d7a710 (patch)
tree75cd6ff555cd1f24340f8a6fca063b1f2c474415 /app/javascript/flavours/glitch/features/video/index.js
parent1bf035fb67065f6f34b96cee3b49cbae8fd16ef5 (diff)
add local setting to auto reveal media behind cw
Diffstat (limited to 'app/javascript/flavours/glitch/features/video/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/video/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js
index cf66536c4..e3ed799c7 100644
--- a/app/javascript/flavours/glitch/features/video/index.js
+++ b/app/javascript/flavours/glitch/features/video/index.js
@@ -119,6 +119,12 @@ export default class Video extends React.PureComponent {
     revealed: this.props.revealed === undefined ? (displayMedia !== 'hide_all' && !this.props.sensitive || displayMedia === 'show_all') : this.props.revealed,
   };
 
+  componentWillReceiveProps (nextProps) {
+    if (nextProps.revealed === true) {
+      this.setState({ revealed: true });
+    }
+  }
+
   // hard coded in components.scss
   // any way to get ::before values programatically?
   volWidth = 50;