Small fixes

pull/162/head
M66B 5 years ago
parent 13548c8f8d
commit f5b727a3c1

@ -160,20 +160,24 @@ public class EntityAccount extends EntityOrder implements Serializable {
json.put("name", name); json.put("name", name);
json.put("color", color); json.put("color", color);
json.put("order", order);
json.put("synchronize", synchronize); json.put("synchronize", synchronize);
json.put("primary", primary); json.put("primary", primary);
json.put("notify", notify); json.put("notify", notify);
json.put("browse", browse); json.put("browse", browse);
json.put("auto_seen", auto_seen);
// not separator
json.put("swipe_left", swipe_left); json.put("swipe_left", swipe_left);
json.put("swipe_right", swipe_right); json.put("swipe_right", swipe_right);
json.put("poll_interval", poll_interval); json.put("poll_interval", poll_interval);
json.put("partial_fetch", partial_fetch); json.put("partial_fetch", partial_fetch);
// not prefix
// not created // not created
// not tbd
// not state // not state
// not warning
// not error // not error
// not last connected // not last connected
return json; return json;
@ -204,8 +208,6 @@ public class EntityAccount extends EntityOrder implements Serializable {
account.name = json.getString("name"); account.name = json.getString("name");
if (json.has("color")) if (json.has("color"))
account.color = json.getInt("color"); account.color = json.getInt("color");
if (json.has("order"))
account.order = json.getInt("order");
account.synchronize = json.getBoolean("synchronize"); account.synchronize = json.getBoolean("synchronize");
account.primary = json.getBoolean("primary"); account.primary = json.getBoolean("primary");
@ -213,6 +215,8 @@ public class EntityAccount extends EntityOrder implements Serializable {
account.notify = json.getBoolean("notify"); account.notify = json.getBoolean("notify");
if (json.has("browse")) if (json.has("browse"))
account.browse = json.getBoolean("browse"); account.browse = json.getBoolean("browse");
if (json.has("auto_seen"))
account.auto_seen = json.getBoolean("auto_seen");
if (json.has("swipe_left")) if (json.has("swipe_left"))
account.swipe_left = json.getLong("swipe_left"); account.swipe_left = json.getLong("swipe_left");
@ -233,7 +237,9 @@ public class EntityAccount extends EntityOrder implements Serializable {
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof EntityAccount) { if (obj instanceof EntityAccount) {
EntityAccount other = (EntityAccount) obj; EntityAccount other = (EntityAccount) obj;
return (this.host.equals(other.host) && return (Objects.equals(this.order, other.order) &&
this.pop == other.pop &&
this.host.equals(other.host) &&
this.starttls == other.starttls && this.starttls == other.starttls &&
this.insecure == other.insecure && this.insecure == other.insecure &&
this.port.equals(other.port) && this.port.equals(other.port) &&
@ -243,11 +249,11 @@ public class EntityAccount extends EntityOrder implements Serializable {
Objects.equals(this.realm, other.realm) && Objects.equals(this.realm, other.realm) &&
Objects.equals(this.name, other.name) && Objects.equals(this.name, other.name) &&
Objects.equals(this.color, other.color) && Objects.equals(this.color, other.color) &&
Objects.equals(this.order, other.order) &&
this.synchronize.equals(other.synchronize) && this.synchronize.equals(other.synchronize) &&
this.primary.equals(other.primary) && this.primary.equals(other.primary) &&
this.notify.equals(other.notify) && this.notify.equals(other.notify) &&
this.browse.equals(other.browse) && this.browse.equals(other.browse) &&
this.auto_seen.equals(other.auto_seen) &&
Objects.equals(this.swipe_left, other.swipe_left) && Objects.equals(this.swipe_left, other.swipe_left) &&
Objects.equals(this.swipe_right, other.swipe_right) && Objects.equals(this.swipe_right, other.swipe_right) &&
this.poll_interval.equals(other.poll_interval) && this.poll_interval.equals(other.poll_interval) &&

@ -97,7 +97,7 @@ public class EntityIdentity {
@NonNull @NonNull
public Boolean read_receipt = false; public Boolean read_receipt = false;
@NonNull @NonNull
public Boolean store_sent = false; public Boolean store_sent = false; // obsolete
public Long sent_folder = null; // obsolete public Long sent_folder = null; // obsolete
public Long sign_key = null; // OpenPGP public Long sign_key = null; // OpenPGP
public Boolean tbd; public Boolean tbd;
@ -172,16 +172,22 @@ public class EntityIdentity {
json.put("synchronize", synchronize); json.put("synchronize", synchronize);
json.put("primary", primary); json.put("primary", primary);
json.put("sender_extra", sender_extra); json.put("sender_extra", sender_extra);
json.put("sender_extra_regex", sender_extra_regex);
json.put("replyto", replyto); json.put("replyto", replyto);
json.put("bcc", bcc); json.put("bcc", bcc);
// not plain_only
json.put("encrypt", encrypt); json.put("encrypt", encrypt);
json.put("delivery_receipt", delivery_receipt); json.put("delivery_receipt", delivery_receipt);
json.put("read_receipt", read_receipt); json.put("read_receipt", read_receipt);
json.put("store_sent", store_sent); // not store_sent
// not sent_folder
// not sign_key
// not tbd
// not state // not state
// not error // not error
// not last_connected
return json; return json;
} }
@ -213,6 +219,8 @@ public class EntityIdentity {
identity.primary = json.getBoolean("primary"); identity.primary = json.getBoolean("primary");
if (json.has("sender_extra")) if (json.has("sender_extra"))
identity.sender_extra = json.getBoolean("sender_extra"); identity.sender_extra = json.getBoolean("sender_extra");
if (json.has("sender_extra_regex"))
identity.sender_extra_regex = json.getString("sender_extra_regex");
if (json.has("replyto") && !json.isNull("replyto")) if (json.has("replyto") && !json.isNull("replyto"))
identity.replyto = json.getString("replyto"); identity.replyto = json.getString("replyto");
@ -226,9 +234,6 @@ public class EntityIdentity {
if (json.has("read_receipt")) if (json.has("read_receipt"))
identity.read_receipt = json.getBoolean("read_receipt"); identity.read_receipt = json.getBoolean("read_receipt");
if (json.has("store_sent"))
identity.store_sent = json.getBoolean("store_sent");
return identity; return identity;
} }
@ -254,12 +259,12 @@ public class EntityIdentity {
this.synchronize.equals(other.synchronize) && this.synchronize.equals(other.synchronize) &&
this.primary.equals(other.primary) && this.primary.equals(other.primary) &&
this.sender_extra.equals(sender_extra) && this.sender_extra.equals(sender_extra) &&
Objects.equals(this.sender_extra_regex, other.sender_extra_regex) &&
Objects.equals(this.replyto, other.replyto) && Objects.equals(this.replyto, other.replyto) &&
Objects.equals(this.bcc, other.bcc) && Objects.equals(this.bcc, other.bcc) &&
this.encrypt.equals(other.encrypt) && this.encrypt.equals(other.encrypt) &&
this.delivery_receipt.equals(other.delivery_receipt) && this.delivery_receipt.equals(other.delivery_receipt) &&
this.read_receipt.equals(other.read_receipt) && this.read_receipt.equals(other.read_receipt) &&
this.store_sent.equals(other.store_sent) &&
Objects.equals(this.tbd, other.tbd) && Objects.equals(this.tbd, other.tbd) &&
Objects.equals(this.state, other.state) && Objects.equals(this.state, other.state) &&
Objects.equals(this.error, other.error) && Objects.equals(this.error, other.error) &&

Loading…
Cancel
Save