|
|
@@ -6,7 +6,7 @@ import IconButton from './icon_button'; |
|
|
|
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; |
|
|
|
import { isIOS } from '../is_mobile'; |
|
|
|
import classNames from 'classnames'; |
|
|
|
import { autoPlayGif, displayMedia } from '../initial_state'; |
|
|
|
import { autoPlayGif, displayMedia, useBlurhash } from '../initial_state'; |
|
|
|
import { decode } from 'blurhash'; |
|
|
|
|
|
|
|
const messages = defineMessages({ |
|
|
@@ -81,6 +81,8 @@ class Item extends React.PureComponent { |
|
|
|
} |
|
|
|
|
|
|
|
_decode () { |
|
|
|
if (!useBlurhash) return; |
|
|
|
|
|
|
|
const hash = this.props.attachment.get('blurhash'); |
|
|
|
const pixels = decode(hash, 32, 32); |
|
|
|
|
|
|
|