mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 06:31:17 +00:00
Count visible messages only
This commit is contained in:
parent
05809bc476
commit
a71f231218
1 changed files with 2 additions and 2 deletions
|
@ -156,10 +156,10 @@ public interface DaoFolder {
|
|||
|
||||
@Query("SELECT folder.type" +
|
||||
", COUNT(message.id) AS messages" +
|
||||
", SUM(CASE WHEN NOT message.ui_seen AND NOT message.ui_hide THEN 1 ELSE 0 END) AS unseen" +
|
||||
", SUM(CASE WHEN NOT message.ui_seen THEN 1 ELSE 0 END) AS unseen" +
|
||||
" FROM folder" +
|
||||
" JOIN account ON account.id = folder.account" +
|
||||
" LEFT JOIN message ON message.folder = folder.id" +
|
||||
" LEFT JOIN message ON message.folder = folder.id AND NOT message.ui_hide" +
|
||||
" WHERE account.synchronize" +
|
||||
" AND folder.type <> '" + EntityFolder.SYSTEM + "'" +
|
||||
" AND folder.type <> '" + EntityFolder.USER + "'" +
|
||||
|
|
Loading…
Reference in a new issue