mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-05 19:21: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) {
|
||||
// Remove unused inline images
|
||||
List<String> cids = new ArrayList<>();
|
||||
for (Element element : JsoupEx.parse(body).select("img")) {
|
||||
String src = element.attr("src");
|
||||
if (src.startsWith("cid:"))
|
||||
cids.add("<" + src.substring(4) + ">");
|
||||
}
|
||||
if (!draft.plain_only)
|
||||
for (Element element : JsoupEx.parse(body).select("img")) {
|
||||
String src = element.attr("src");
|
||||
if (src.startsWith("cid:"))
|
||||
cids.add("<" + src.substring(4) + ">");
|
||||
}
|
||||
|
||||
for (EntityAttachment attachment : new ArrayList<>(attachments))
|
||||
if (attachment.isInline() && !cids.contains(attachment.cid)) {
|
||||
|
@ -4034,7 +4035,6 @@ public class FragmentCompose extends FragmentBase {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void setBusy(boolean busy) {
|
||||
FragmentCompose.this.busy = busy;
|
||||
Helper.setViewsEnabled(view, !busy);
|
||||
|
|
Loading…
Add table
Reference in a new issue