mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
Scale gravatars/libravatars if needed
This commit is contained in:
parent
3844f178ea
commit
f5a2cc2d82
1 changed files with 2 additions and 2 deletions
|
@ -398,7 +398,7 @@ public class ContactInfo {
|
|||
int status = urlConnection.getResponseCode();
|
||||
if (status == HttpURLConnection.HTTP_OK) {
|
||||
// Positive reply
|
||||
Bitmap bitmap = BitmapFactory.decodeStream(urlConnection.getInputStream());
|
||||
Bitmap bitmap = ImageHelper.getScaledBitmap(urlConnection.getInputStream(), url.toString(), null, scaleToPixels);
|
||||
return (bitmap == null ? null : new Favicon(bitmap, "gravatar", false));
|
||||
} else if (status == HttpURLConnection.HTTP_NOT_FOUND) {
|
||||
// Negative reply
|
||||
|
@ -441,7 +441,7 @@ public class ContactInfo {
|
|||
int status = urlConnection.getResponseCode();
|
||||
if (status == HttpURLConnection.HTTP_OK) {
|
||||
// Positive reply
|
||||
Bitmap bitmap = BitmapFactory.decodeStream(urlConnection.getInputStream());
|
||||
Bitmap bitmap = ImageHelper.getScaledBitmap(urlConnection.getInputStream(), url.toString(), null, scaleToPixels);
|
||||
return (bitmap == null ? null : new Favicon(bitmap, "libravatar", false));
|
||||
} else if (status == HttpURLConnection.HTTP_NOT_FOUND) {
|
||||
// Negative reply
|
||||
|
|
Loading…
Reference in a new issue