FairEmail/app/src/main/java/eu/faircode/email/TupleAccountEx.java

51 lines
1.7 KiB
Java
Raw Normal View History

2018-12-16 16:39:15 +00:00
package eu.faircode.email;
/*
This file is part of FairEmail.
FairEmail is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
FairEmail is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FairEmail. If not, see <http://www.gnu.org/licenses/>.
2018-12-31 08:04:33 +00:00
Copyright 2018-2019 by Marcel Bokhorst (M66B)
2018-12-16 16:39:15 +00:00
*/
public class TupleAccountEx extends EntityAccount {
public int unseen;
2019-03-18 13:35:45 +00:00
public int unsent;
public int operations;
public boolean drafts;
2018-12-16 16:39:15 +00:00
2019-03-19 17:50:48 +00:00
public boolean uiEquals(Object obj) {
if (obj instanceof TupleAccountEx) {
TupleAccountEx other = (TupleAccountEx) obj;
2019-03-19 18:12:40 +00:00
return (super.equals(obj) &&
this.unseen == other.unseen &&
this.drafts == other.drafts);
2019-03-19 17:50:48 +00:00
} else
return false;
}
2018-12-16 16:39:15 +00:00
@Override
public boolean equals(Object obj) {
if (obj instanceof TupleAccountEx) {
TupleAccountEx other = (TupleAccountEx) obj;
return (super.equals(obj) &&
this.unseen == other.unseen &&
2019-03-18 13:35:45 +00:00
this.unsent == other.unsent &&
this.operations == other.operations &&
this.drafts == other.drafts);
2018-12-16 16:39:15 +00:00
} else
return false;
}
}