mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Individual account management proof of concept
This commit is contained in:
@@ -19,7 +19,10 @@ package eu.faircode.email;
|
||||
Copyright 2018-2019 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class TupleAccountState extends EntityAccount {
|
||||
// TODO: folder property changes (name, synchronize, poll)
|
||||
public int folders;
|
||||
public int operations;
|
||||
|
||||
@@ -27,10 +30,25 @@ public class TupleAccountState extends EntityAccount {
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof TupleAccountState) {
|
||||
TupleAccountState other = (TupleAccountState) obj;
|
||||
return (super.equals(obj) && // TODO selected attributes
|
||||
this.folders == other.folders &&
|
||||
this.operations == other.operations);
|
||||
return (this.host.equals(other.host) &&
|
||||
this.starttls == other.starttls &&
|
||||
this.insecure == other.insecure &&
|
||||
this.port.equals(other.port) &&
|
||||
// auth_type
|
||||
this.user.equals(other.user) &&
|
||||
this.password.equals(other.password) &&
|
||||
Objects.equals(this.realm, other.realm) &&
|
||||
this.notify == other.notify &&
|
||||
this.poll_interval.equals(other.poll_interval) &&
|
||||
this.partial_fetch == other.partial_fetch &&
|
||||
this.ignore_size == other.ignore_size &&
|
||||
this.use_date == other.use_date &&
|
||||
this.folders == other.folders);
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean shouldRun() {
|
||||
return (synchronize && (folders > 0 || operations > 0));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user