From a7266739c258f573bace57f9fee2357de354a23e Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 3 May 2019 17:27:29 +0200 Subject: [PATCH] Simplification --- app/src/main/java/eu/faircode/email/AdapterMessage.java | 3 +-- app/src/main/java/eu/faircode/email/FragmentCompose.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 7cb447b915..7f94f7ef04 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -1762,8 +1762,7 @@ public class AdapterMessage extends RecyclerView.Adapter width) { float scale = width / image.getIntrinsicWidth(); image.setBounds(0, 0, diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 19c06ebc83..99ad8521a8 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -2762,8 +2762,7 @@ public class FragmentCompose extends FragmentBase { public Drawable getDrawable(String source) { Drawable image = HtmlHelper.decodeImage(source, id, show_images, tvReference); - float width = context.getResources().getDisplayMetrics().widthPixels - - Helper.dp2pixels(context, 12); // margins; + float width = tvReference.getWidth(); if (image.getIntrinsicWidth() > width) { float scale = width / image.getIntrinsicWidth(); image.setBounds(0, 0,