From 6ad76069096005d7b55d9c63a567f843997a8068 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 1 Oct 2018 14:15:47 +0200 Subject: [Glitch] Add support for new display_media setting Port f7a6f9489da9b2a1820366654df47b8a52f5c5bc to glitch-soc [API] [vanilla required] [glitch-soc optional] initial_state show_sensitive_media boolean changed to show_media string with options "default", "hide_all", "show_all" --- app/javascript/flavours/glitch/features/video/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 5cbe01f26..227f298e4 100644 --- a/app/javascript/flavours/glitch/features/video/index.js +++ b/app/javascript/flavours/glitch/features/video/index.js @@ -5,7 +5,7 @@ import { fromJS } from 'immutable'; import { throttle } from 'lodash'; import classNames from 'classnames'; import { isFullscreen, requestFullscreen, exitFullscreen } from 'flavours/glitch/util/fullscreen'; -import { displaySensitiveMedia } from 'flavours/glitch/util/initial_state'; +import { displayMedia } from 'flavours/glitch/util/initial_state'; const messages = defineMessages({ play: { id: 'video.play', defaultMessage: 'Play' }, @@ -114,7 +114,7 @@ export default class Video extends React.PureComponent { fullscreen: false, hovered: false, muted: false, - revealed: this.props.revealed === undefined ? (!this.props.sensitive || displaySensitiveMedia) : this.props.revealed, + revealed: this.props.revealed === undefined ? (displayMedia !== 'hide_all' && !this.props.sensitive || displayMedia === 'show_all') : this.props.revealed, }; setPlayerRef = c => { -- cgit