Show number unread inbox for accounts

This commit is contained in:
M66B
2020-10-21 19:19:22 +02:00
parent 4c6aeab96b
commit d21f9e6edb
4 changed files with 36 additions and 3 deletions

View File

@@ -62,6 +62,13 @@ public interface DaoAccount {
" AND folder.type <> '" + EntityFolder.OUTBOX + "'" +
" AND NOT ui_seen" +
" AND NOT ui_hide) AS unseen" +
", (SELECT COUNT(DISTINCT message.id)" +
" FROM message" +
" JOIN folder ON folder.id = message.folder" +
" WHERE message.account = account.id" +
" AND folder.type = '" + EntityFolder.INBOX + "'" +
" AND NOT ui_seen" +
" AND NOT ui_hide) AS inbox" +
", (SELECT COUNT(identity.id)" +
" FROM identity" +
" WHERE identity.account = account.id" +