-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make avatar and headers respect auto_play_gif
#9515
Make avatar and headers respect auto_play_gif
#9515
Conversation
app/views/accounts/_header.html.haml
Outdated
@@ -1,6 +1,9 @@ | |||
.public-account-header{:class => ("inactive" if account.moved?)} | |||
.public-account-header__image | |||
= image_tag account.header.url, class: 'parallax' | |||
- if current_account&.user&.setting_auto_play_gif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why using blocks here if you just need to switch the URL. Ternary operator should do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the code for avatars that is just a few lines below:
https://github.com/tootsuite/mastodon/pull/9515/files#diff-282ac2735bdc933e88272b729a2faf8bL6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK but that code is bad too. I think ideally it would be extracted to a helper method altogether.
* Do not animate account header art if user's GIF autoplay setting is off Fixes mastodon#9472 * Honour currently logged-in user's GIF autoplay setting for account avatars Fixes mastodon#9467 * Fix avatar display on some public pages when data is stored on a different host * Use ternary operator instead of if/else for avatar/header URL
Also fix avatar URLs in some public pages when data is stored on a different host