mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Fixed folder message count
This commit is contained in:
parent
29c398eb1e
commit
444ed41e50
1 changed files with 3 additions and 3 deletions
|
@ -50,7 +50,7 @@ public interface DaoFolder {
|
|||
", SUM(CASE WHEN message.ui_seen = 0 THEN 1 ELSE 0 END) AS unseen" +
|
||||
" FROM folder" +
|
||||
" LEFT JOIN account ON account.id = folder.account" +
|
||||
" LEFT JOIN message ON message.folder = folder.id AND NOT message.ui_hide" +
|
||||
" LEFT JOIN message ON message.folder = folder.id AND NOT message.ui_hide AND NOT message.ui_found" +
|
||||
" WHERE folder.account = :account OR folder.account IS NULL" +
|
||||
" GROUP BY folder.id")
|
||||
LiveData<List<TupleFolderEx>> liveFolders(long account);
|
||||
|
@ -66,7 +66,7 @@ public interface DaoFolder {
|
|||
", SUM(CASE WHEN message.ui_seen = 0 THEN 1 ELSE 0 END) AS unseen" +
|
||||
" FROM folder" +
|
||||
" JOIN account ON account.id = folder.account" +
|
||||
" JOIN message ON message.folder = folder.id AND NOT message.ui_hide" +
|
||||
" JOIN message ON message.folder = folder.id AND NOT message.ui_hide AND NOT message.ui_found" +
|
||||
" WHERE account.`synchronize`" +
|
||||
" AND folder.unified" +
|
||||
" GROUP BY folder.id")
|
||||
|
@ -81,7 +81,7 @@ public interface DaoFolder {
|
|||
", SUM(CASE WHEN message.ui_seen = 0 THEN 1 ELSE 0 END) AS unseen" +
|
||||
" FROM folder" +
|
||||
" LEFT JOIN account ON account.id = folder.account" +
|
||||
" LEFT JOIN message ON message.folder = folder.id AND NOT message.ui_hide" +
|
||||
" LEFT JOIN message ON message.folder = folder.id AND NOT message.ui_hide AND NOT message.ui_found" +
|
||||
" WHERE folder.id = :id")
|
||||
LiveData<TupleFolderEx> liveFolderEx(long id);
|
||||
|
||||
|
|
Loading…
Reference in a new issue