[Glitch] Add support for new display_media setting
Port f7a6f9489d
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"
This commit is contained in:
@@ -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 => {
|
||||
|
Reference in New Issue
Block a user