Fixed race condition while handling sent messages

This commit is contained in:
M66B
2019-02-17 09:18:42 +00:00
parent 28fc0d9a18
commit 2f9d4c7ebb
7 changed files with 76 additions and 155 deletions

View File

@@ -82,8 +82,8 @@ public class EntityIdentity {
@NonNull
public Boolean read_receipt = false;
@NonNull
public Boolean store_sent = false;
public Long sent_folder; // obsolete
public Boolean store_sent = false; // obsolete
public Long sent_folder = null; // obsolete
public Boolean tbd;
public String state;
public String error;
@@ -122,7 +122,6 @@ public class EntityIdentity {
json.put("plain_only", plain_only);
json.put("delivery_receipt", delivery_receipt);
json.put("read_receipt", read_receipt);
json.put("store_sent", store_sent);
// not state
// not error
return json;
@@ -165,9 +164,6 @@ public class EntityIdentity {
if (json.has("read_receipt"))
identity.read_receipt = json.getBoolean("read_receipt");
if (json.has("store_sent"))
identity.store_sent = json.getBoolean("store_sent");
return identity;
}
@@ -195,7 +191,6 @@ public class EntityIdentity {
(this.bcc == null ? other.bcc == null : this.bcc.equals(other.bcc)) &&
this.delivery_receipt.equals(other.delivery_receipt) &&
this.read_receipt.equals(other.read_receipt) &&
this.store_sent.equals(other.store_sent) &&
(this.tbd == null ? other.tbd == null : this.tbd.equals(other.tbd)) &&
(this.state == null ? other.state == null : this.state.equals(other.state)) &&
(this.error == null ? other.error == null : this.error.equals(other.error)) &&