diff --git a/FAQ.md b/FAQ.md index 5844500e0b..2191d58724 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1691,8 +1691,9 @@ You'll likely want to disabled [browse on server](#user-content-faq24) too. Please see [here](https://en.wikipedia.org/wiki/Web_beacon) about what a tracking image exactly is. In short tracking images keep track if you opened a message. -FairEmail automatically recognizes images with a surface of less than or equal to 25 pixels as tracking images. -FairEmail automatically removes the link of such images, which makes such images appear as broken, and adds a remark about this below the image. +FairEmail will in most cases automatically recognize tracking images and replace them by this icon: + +![External image](https://raw.githubusercontent.com/google/material-design-icons/master/maps/1x_web/ic_my_location_black_48dp.png) Automatic recognition of tracking images can be disabled in the behavior settings. diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index ce909a849d..4271ef27c1 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -1468,6 +1468,14 @@ public class AdapterMessage extends RecyclerView.Adapter hosts = new ArrayList<>(); for (Element img : document.select("img")) { @@ -489,11 +512,11 @@ public class HtmlHelper { Uri uri = Uri.parse(img.attr("src")); String host = uri.getHost(); if (host == null || !hosts.contains(host)) { - img.removeAttr("src"); - img.tagName("a"); - img.attr("href", src); - img.appendText(context.getString(R.string.title_hint_tracking_image, - img.attr("width"), img.attr("height"))); + img.attr("src", sb.toString()); + img.attr("alt", context.getString(R.string.title_legend_tracking_pixel)); + img.attr("height", "24"); + img.attr("width", "24"); + img.attr("style", "display: block !important;"); } } } diff --git a/app/src/main/res/drawable/baseline_my_location_24.xml b/app/src/main/res/drawable/baseline_my_location_24.xml new file mode 100644 index 0000000000..64266bd392 --- /dev/null +++ b/app/src/main/res/drawable/baseline_my_location_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/dialog_show_images.xml b/app/src/main/res/layout/dialog_show_images.xml index 654ba28414..8883375018 100644 --- a/app/src/main/res/layout/dialog_show_images.xml +++ b/app/src/main/res/layout/dialog_show_images.xml @@ -20,18 +20,40 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_webview.xml b/app/src/main/res/layout/dialog_webview.xml deleted file mode 100644 index d52f122fd4..0000000000 --- a/app/src/main/res/layout/dialog_webview.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/layout/fragment_legend_messages.xml b/app/src/main/res/layout/fragment_legend_messages.xml index 85beecbd77..74fba5b877 100644 --- a/app/src/main/res/layout/fragment_legend_messages.xml +++ b/app/src/main/res/layout/fragment_legend_messages.xml @@ -454,6 +454,28 @@ app:layout_constraintStart_toEndOf="@id/ivEmbeddedImage" app:layout_constraintTop_toTopOf="@id/ivEmbeddedImage" /> + + + + Download content External image placeholder Embedded image placeholder + Tracking pixel Broken image Pick contact @@ -816,8 +817,6 @@ Swipe left to trash; Swipe right to archive (if available); The swipe actions can be configured in the account settings Long press a message to start selecting multiple messages; Hold and swipe up or down to select more messages Downloading messages can take some time, depending on the speed of the provider, internet connection and device and on the number of messages. While downloading messages the app might respond slower. - Image link - Tracking image %1$sx%2$s Long press for options Open link