mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-06 03:33:07 +00:00
Remove inline images from plain-only messages
This commit is contained in:
parent
cc87c0eebb
commit
1650d6c67d
1 changed files with 6 additions and 6 deletions
|
@ -3854,11 +3854,12 @@ public class FragmentCompose extends FragmentBase {
|
||||||
} else if (action == R.id.action_send) {
|
} else if (action == R.id.action_send) {
|
||||||
// Remove unused inline images
|
// Remove unused inline images
|
||||||
List<String> cids = new ArrayList<>();
|
List<String> cids = new ArrayList<>();
|
||||||
for (Element element : JsoupEx.parse(body).select("img")) {
|
if (!draft.plain_only)
|
||||||
String src = element.attr("src");
|
for (Element element : JsoupEx.parse(body).select("img")) {
|
||||||
if (src.startsWith("cid:"))
|
String src = element.attr("src");
|
||||||
cids.add("<" + src.substring(4) + ">");
|
if (src.startsWith("cid:"))
|
||||||
}
|
cids.add("<" + src.substring(4) + ">");
|
||||||
|
}
|
||||||
|
|
||||||
for (EntityAttachment attachment : new ArrayList<>(attachments))
|
for (EntityAttachment attachment : new ArrayList<>(attachments))
|
||||||
if (attachment.isInline() && !cids.contains(attachment.cid)) {
|
if (attachment.isInline() && !cids.contains(attachment.cid)) {
|
||||||
|
@ -4034,7 +4035,6 @@ public class FragmentCompose extends FragmentBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void setBusy(boolean busy) {
|
private void setBusy(boolean busy) {
|
||||||
FragmentCompose.this.busy = busy;
|
FragmentCompose.this.busy = busy;
|
||||||
Helper.setViewsEnabled(view, !busy);
|
Helper.setViewsEnabled(view, !busy);
|
||||||
|
|
Loading…
Add table
Reference in a new issue