mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 07:01:05 +00:00
Show snoozed count for outbox
This commit is contained in:
parent
687fc722e5
commit
efb2107fd1
3 changed files with 4 additions and 1 deletions
|
@ -107,7 +107,7 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
|||
ivItem.setColorFilter(folder.accountColor);
|
||||
}
|
||||
|
||||
int count = (EntityFolder.OUTBOX.equals(folder.type) ? folder.operations : folder.unseen);
|
||||
int count = (EntityFolder.OUTBOX.equals(folder.type) ? folder.snoozed + folder.operations : folder.unseen);
|
||||
|
||||
if (count == 0)
|
||||
tvItem.setText(folder.getDisplayName(context));
|
||||
|
@ -227,6 +227,7 @@ public class AdapterNavFolder extends RecyclerView.Adapter<AdapterNavFolder.View
|
|||
Objects.equals(f1.sync_state, f2.sync_state) &&
|
||||
Objects.equals(f1.last_sync, f2.last_sync) &&
|
||||
f1.unseen == f2.unseen &&
|
||||
f1.snoozed == f2.snoozed &&
|
||||
f1.operations == f2.operations &&
|
||||
f1.executing == f2.executing);
|
||||
}
|
||||
|
|
|
@ -109,6 +109,7 @@ public interface DaoFolder {
|
|||
@Query("SELECT folder.*" +
|
||||
", account.`order` AS accountOrder, account.name AS accountName, account.color AS accountColor" +
|
||||
", SUM(CASE WHEN message.ui_seen = 0 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 AND operation.state = 'executing') AS executing" +
|
||||
" FROM folder" +
|
||||
|
|
|
@ -31,6 +31,7 @@ public class TupleFolderNav extends EntityFolder implements Serializable {
|
|||
public String accountName;
|
||||
public Integer accountColor;
|
||||
public int unseen;
|
||||
public int snoozed;
|
||||
public int operations;
|
||||
public int executing;
|
||||
|
||||
|
|
Loading…
Reference in a new issue