Skip to content
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

Merged

Conversation

ClearlyClaire
Copy link
Contributor

Also fix avatar URLs in some public pages when data is stored on a different host

@@ -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
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

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.

@Gargron Gargron merged commit 7c48688 into mastodon:master Dec 14, 2018
@ClearlyClaire ClearlyClaire deleted the fixes/account-header-gif-autoplay branch March 14, 2019 15:40
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants