From 45db66b4f75acfbb8e71766a133935850904ad55 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 16 Nov 2020 18:53:56 +0100 Subject: [PATCH] Always remove small images --- .../eu/faircode/email/AdapterMessage.java | 2 +- .../java/eu/faircode/email/HtmlHelper.java | 34 +++++++++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 7597ed6733..4b86206b99 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -2167,7 +2167,7 @@ public class AdapterMessage extends RecyclerView.Adapter MAX_ALT) alt = alt.substring(0, MAX_ALT) + "…"; @@ -1517,7 +1533,7 @@ public class HtmlHelper { return sb.toString(); } - static void removeTrackingPixels(Context context, Document document, boolean full) { + static void removeTrackingPixels(Context context, Document document) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); boolean disconnect_images = prefs.getBoolean("disconnect_images", false); @@ -1559,18 +1575,8 @@ public class HtmlHelper { Uri uri = Uri.parse(src); String host = uri.getHost(); - if (host == null || hosts.contains(host)) { - if (!full) { - // Remove spacer, etc - Integer width = Helper.parseInt(img.attr("width").trim()); - Integer height = Helper.parseInt(img.attr("height").trim()); - if ((width != null && width <= SMALL_IMAGE_SIZE) || - (height != null && height <= SMALL_IMAGE_SIZE)) - img.remove(); - } - + if (host == null || hosts.contains(host)) continue; - } if (isTrackingPixel(img) || isTrackingHost(host, disconnect_images)) { img.attr("src", sb.toString());