Defer downloading body

This commit is contained in:
M66B
2018-09-15 07:22:42 +00:00
parent 9c92f19127
commit 87ead339f9
10 changed files with 1035 additions and 18 deletions

View File

@@ -90,6 +90,8 @@ public class EntityMessage implements Serializable {
public Address[] reply;
public String headers;
public String subject;
@NonNull
public Boolean downloaded = false;
public Long sent; // compose = null
@NonNull
public Long received; // compose = stored
@@ -135,6 +137,7 @@ public class EntityMessage implements Serializable {
this.body = (body == null ? "" : body);
out = new BufferedWriter(new FileWriter(file));
out.write(this.body);
this.downloaded = true;
} finally {
if (out != null)
try {