[Glitch] Add option to disable blurhash previews
Port 3086c645fd
to glitch-soc
This commit is contained in:
@@ -5,7 +5,7 @@ import { fromJS, is } from 'immutable';
|
||||
import { throttle } from 'lodash';
|
||||
import classNames from 'classnames';
|
||||
import { isFullscreen, requestFullscreen, exitFullscreen } from 'flavours/glitch/util/fullscreen';
|
||||
import { displayMedia } from 'flavours/glitch/util/initial_state';
|
||||
import { displayMedia, useBlurhash } from 'flavours/glitch/util/initial_state';
|
||||
import { decode } from 'blurhash';
|
||||
|
||||
const messages = defineMessages({
|
||||
@@ -312,7 +312,7 @@ export default class Video extends React.PureComponent {
|
||||
}
|
||||
|
||||
_decode () {
|
||||
if (!this.canvas) return;
|
||||
if (!this.canvas || !useBlurhash) return;
|
||||
|
||||
const hash = this.props.blurhash;
|
||||
const pixels = decode(hash, 32, 32);
|
||||
|
Reference in New Issue
Block a user