mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Fixed hiding image placeholders
This commit is contained in:
parent
38343a8290
commit
75bbc2ec03
1 changed files with 4 additions and 3 deletions
|
@ -952,6 +952,7 @@ public class HtmlHelper {
|
|||
String alt = img.attr("alt");
|
||||
String src = img.attr("src");
|
||||
String tracking = img.attr("x-tracking");
|
||||
boolean isInline = src.startsWith("cid:");
|
||||
|
||||
if (TextUtils.isEmpty(src)) {
|
||||
Log.i("Removing empty image");
|
||||
|
@ -959,14 +960,14 @@ public class HtmlHelper {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!show_images && !inline_images && !image_placeholders) {
|
||||
if (!show_images && !(inline_images && isInline) && !image_placeholders) {
|
||||
Log.i("Removing placeholder");
|
||||
img.removeAttr("src");
|
||||
continue;
|
||||
}
|
||||
|
||||
// Remove spacer, etc
|
||||
if (!show_images && !inline_images &&
|
||||
if (!show_images && !(inline_images && isInline) &&
|
||||
TextUtils.isEmpty(img.attr("x-tracking"))) {
|
||||
Log.i("Removing small image");
|
||||
Integer width = Helper.parseInt(img.attr("width").trim());
|
||||
|
@ -981,7 +982,7 @@ public class HtmlHelper {
|
|||
if (alt.length() > MAX_ALT)
|
||||
alt = alt.substring(0, MAX_ALT) + "…";
|
||||
|
||||
if (!show_images && !(inline_images && src.startsWith("cid:")) && !TextUtils.isEmpty(alt))
|
||||
if (!show_images && !(inline_images && isInline) && !TextUtils.isEmpty(alt))
|
||||
if (TextUtils.isEmpty(tracking))
|
||||
img.appendText("[" + alt + "]");
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue