Added unified folder categories, refactoring

This commit is contained in:
M66B
2021-10-04 08:03:09 +02:00
parent b09a90b247
commit 87ba2794e5
9 changed files with 139 additions and 20 deletions

View File

@@ -41,6 +41,7 @@ public class TupleFolderEx extends EntityFolder implements Serializable {
public Integer accountProtocol;
public Integer accountOrder;
public String accountName;
public String accountCategory;
public Integer accountColor;
public String accountState;
public int rules;
@@ -70,6 +71,7 @@ public class TupleFolderEx extends EntityFolder implements Serializable {
Objects.equals(this.accountProtocol, other.accountProtocol) &&
Objects.equals(this.accountOrder, other.accountOrder) &&
Objects.equals(this.accountName, other.accountName) &&
Objects.equals(this.accountCategory, other.accountCategory) &&
Objects.equals(this.accountColor, other.accountColor) &&
Objects.equals(this.accountState, other.accountState) &&
this.rules == other.rules &&
@@ -117,6 +119,12 @@ public class TupleFolderEx extends EntityFolder implements Serializable {
TupleFolderEx f1 = (TupleFolderEx) o1;
TupleFolderEx f2 = (TupleFolderEx) o2;
int c = collator.compare(
f1.accountCategory == null ? "" : f1.accountCategory,
f2.accountCategory == null ? "" : f2.accountCategory);
if (c != 0)
return c;
// Outbox
if (f1.accountName == null && f2.accountName == null)
return 0;