]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Make animated header resoect `auto_play_gif`
authorThibaut Girka <thib@sitedethib.com>
Sun, 16 Dec 2018 12:34:01 +0000 (13:34 +0100)
committerThibaut Girka <thib@sitedethib.com>
Sun, 16 Dec 2018 13:48:15 +0000 (14:48 +0100)
Port part of 7c48688d85d0ab64501cea6b8a516867a786bb4c to glitch-soc

app/javascript/flavours/glitch/features/account/components/header.js

index f0d36947df3a9993d1f60576da366eda997b063c..dc5b1447b4609200c07a11511fa07b7de9048cea 100644 (file)
@@ -7,7 +7,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
 import Avatar from 'flavours/glitch/components/avatar';
 import IconButton from 'flavours/glitch/components/icon_button';
 
-import { me } from 'flavours/glitch/util/initial_state';
+import { autoPlayGif, me } from 'flavours/glitch/util/initial_state';
 import classNames from 'classnames';
 
 const messages = defineMessages({
@@ -108,7 +108,7 @@ export default class Header extends ImmutablePureComponent {
 
     return (
       <div className='account__header__wrapper'>
-        <div className={classNames('account__header', { inactive: !!account.get('moved') })} style={{ backgroundImage: `url(${account.get('header')})` }}>
+        <div className={classNames('account__header', { inactive: !!account.get('moved') })} style={{ backgroundImage: `url(${autoPlayGif ? account.get('header') : account.get('header_static')})` }}>
           <div>
             <a
               href={account.get('url')}