mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-26 07:53:12 +00:00
Simplification
This commit is contained in:
parent
cdf0d2d418
commit
0167033bd4
3 changed files with 2 additions and 6 deletions
|
@ -112,9 +112,8 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
||||||
}
|
}
|
||||||
|
|
||||||
int count;
|
int count;
|
||||||
if (EntityFolder.OUTBOX.equals(folder.type))
|
if (EntityFolder.DRAFTS.equals(folder.type) ||
|
||||||
count = folder.snoozed + folder.operations;
|
EntityFolder.OUTBOX.equals(folder.type))
|
||||||
else if (EntityFolder.DRAFTS.equals(folder.type))
|
|
||||||
count = folder.messages;
|
count = folder.messages;
|
||||||
else
|
else
|
||||||
count = folder.unseen;
|
count = folder.unseen;
|
||||||
|
|
|
@ -115,7 +115,6 @@ public interface DaoFolder {
|
||||||
", account.`order` AS accountOrder, account.name AS accountName, COALESCE(folder.color, account.color) AS accountColor" +
|
", account.`order` AS accountOrder, account.name AS accountName, COALESCE(folder.color, account.color) AS accountColor" +
|
||||||
", COUNT(message.id) AS messages" +
|
", COUNT(message.id) AS messages" +
|
||||||
", SUM(CASE WHEN NOT message.ui_seen THEN 1 ELSE 0 END) AS unseen" +
|
", SUM(CASE WHEN NOT message.ui_seen THEN 1 ELSE 0 END) AS unseen" +
|
||||||
", SUM(CASE WHEN message.ui_snoozed IS NULL THEN 0 ELSE 1 END) AS snoozed" +
|
|
||||||
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id) AS operations" +
|
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id) AS operations" +
|
||||||
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id AND operation.state = 'executing') AS executing" +
|
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id AND operation.state = 'executing') AS executing" +
|
||||||
" FROM folder" +
|
" FROM folder" +
|
||||||
|
|
|
@ -33,7 +33,6 @@ public class TupleFolderNav extends EntityFolder implements Serializable {
|
||||||
public Integer accountColor;
|
public Integer accountColor;
|
||||||
public int messages;
|
public int messages;
|
||||||
public int unseen;
|
public int unseen;
|
||||||
public int snoozed;
|
|
||||||
public int operations;
|
public int operations;
|
||||||
public int executing;
|
public int executing;
|
||||||
|
|
||||||
|
@ -89,7 +88,6 @@ public class TupleFolderNav extends EntityFolder implements Serializable {
|
||||||
Objects.equals(this.accountColor, other.accountColor) &&
|
Objects.equals(this.accountColor, other.accountColor) &&
|
||||||
this.messages == other.messages &&
|
this.messages == other.messages &&
|
||||||
this.unseen == other.unseen &&
|
this.unseen == other.unseen &&
|
||||||
this.snoozed == other.snoozed &&
|
|
||||||
this.operations == other.operations &&
|
this.operations == other.operations &&
|
||||||
this.executing == other.executing);
|
this.executing == other.executing);
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in a new issue