mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 03:15:39 +01:00
Added unified folder categories, refactoring
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user