diff options
author | Stan Hu <stanhu@gmail.com> | 2015-11-26 19:13:28 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-11-26 19:13:28 +0300 |
commit | 2f90e71fd337c746c143f21b1806ebc71d907b62 (patch) | |
tree | 6d5fc6554c3496cd22288c654fecf7deb676df41 /app/services/gravatar_service.rb | |
parent | 1befbbf57dddc23761558f21017294c950d6d3b7 (diff) | |
parent | 3b717c8a8c1e0f10bc06fd8501ce2423c98490d4 (diff) |
Merge pull request #9670 from janten/gravatar-retina
Add support for HiDPI displays in gravatar service
Diffstat (limited to 'app/services/gravatar_service.rb')
-rw-r--r-- | app/services/gravatar_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/gravatar_service.rb b/app/services/gravatar_service.rb index 4bee0c26a68..433ecc2df32 100644 --- a/app/services/gravatar_service.rb +++ b/app/services/gravatar_service.rb @@ -1,13 +1,13 @@ class GravatarService include Gitlab::CurrentSettings - def execute(email, size = nil) + def execute(email, size = nil, scale = 2) if current_application_settings.gravatar_enabled? && email.present? size = 40 if size.nil? || size <= 0 sprintf gravatar_url, hash: Digest::MD5.hexdigest(email.strip.downcase), - size: size, + size: size * scale, email: email.strip end end |