[feature] Move use_blurhash to app settings, enable by default (#5)
Does what it says on the tin! This serves as a decent model (imo) for how to move something from Mastodon's rather opaque server-side settings to client settings. Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/5 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
This commit is contained in:
@@ -7,9 +7,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
|
||||
import { Blurhash } from 'flavours/glitch/components/blurhash';
|
||||
import { Icon } from 'flavours/glitch/components/icon';
|
||||
import { autoPlayGif, displayMedia, useBlurhash } from 'flavours/glitch/initial_state';
|
||||
|
||||
|
||||
import { autoPlayGif, displayMedia } from 'flavours/glitch/initial_state';
|
||||
|
||||
export default class MediaItem extends ImmutablePureComponent {
|
||||
|
||||
@@ -17,6 +15,7 @@ export default class MediaItem extends ImmutablePureComponent {
|
||||
attachment: ImmutablePropTypes.map.isRequired,
|
||||
displayWidth: PropTypes.number.isRequired,
|
||||
onOpenMedia: PropTypes.func.isRequired,
|
||||
useBlurhash: PropTypes.bool,
|
||||
};
|
||||
|
||||
state = {
|
||||
@@ -58,7 +57,7 @@ export default class MediaItem extends ImmutablePureComponent {
|
||||
};
|
||||
|
||||
render () {
|
||||
const { attachment, displayWidth } = this.props;
|
||||
const { attachment, displayWidth, useBlurhash } = this.props;
|
||||
const { visible, loaded } = this.state;
|
||||
|
||||
const width = `${Math.floor((displayWidth - 4) / 3) - 4}px`;
|
||||
|
||||
Reference in New Issue
Block a user