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
merged 4 commits into from Dec 14, 2018

Conversation

Projects
None yet
2 participants
@ThibG
Copy link
Collaborator

ThibG commented Dec 13, 2018

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

This comment has been minimized.

@Gargron

Gargron Dec 14, 2018

Member

Why using blocks here if you just need to switch the URL. Ternary operator should do

This comment has been minimized.

@ThibG

ThibG Dec 14, 2018

Author Collaborator

For consistency with the code for avatars that is just a few lines below:
https://github.com/tootsuite/mastodon/pull/9515/files#diff-282ac2735bdc933e88272b729a2faf8bL6

This comment has been minimized.

@Gargron

Gargron Dec 14, 2018

Member

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 tootsuite:master Dec 14, 2018

11 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: check-i18n Your tests passed on CircleCI!
Details
ci/circleci: install Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.3 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.3 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: test-webui Your tests passed on CircleCI!
Details
codeclimate All good!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment