From f534f4869ecb52cb48f3e68e42752d8f81d7a710 Mon Sep 17 00:00:00 2001 From: ash lea Date: Sun, 10 Mar 2019 15:34:51 -0400 Subject: add local setting to auto reveal media behind cw --- app/javascript/flavours/glitch/features/video/index.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/javascript/flavours/glitch/features/video') 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; -- cgit