From df24a24f1643d953f86ed82a0036e329df042d7b Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 3 Jul 2021 21:34:52 +0200 Subject: [PATCH] Prevent viewing tracking icon --- app/src/main/java/eu/faircode/email/AdapterMessage.java | 6 ++++-- app/src/main/java/eu/faircode/email/ImageHelper.java | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 20ded4c31f..39a1a3c38b 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -4507,9 +4507,11 @@ public class AdapterMessage extends RecyclerView.Adapter 0) { - String source = image[0].getSource(); + ImageHelper.AnnotatedSource a = new ImageHelper.AnnotatedSource(image[0].getSource()); + String source = a.getSource(); if (!TextUtils.isEmpty(source)) { - onOpenImage(message.id, source); + if (!a.isTracking()) + onOpenImage(message.id, source); return true; } } diff --git a/app/src/main/java/eu/faircode/email/ImageHelper.java b/app/src/main/java/eu/faircode/email/ImageHelper.java index 5e93103b42..5480c3bfa1 100644 --- a/app/src/main/java/eu/faircode/email/ImageHelper.java +++ b/app/src/main/java/eu/faircode/email/ImageHelper.java @@ -881,6 +881,10 @@ class ImageHelper { return this.source; } + public boolean isTracking() { + return this.tracking; + } + String getAnnotated() { return (width == 0 && height == 0 ? source