Fixed counts in single message mode (2)

This commit is contained in:
M66B 2019-12-18 08:35:00 +01:00
parent 38e6f7ed6e
commit 76301089b8
1 changed files with 2 additions and 0 deletions

View File

@ -65,6 +65,7 @@ public interface DaoMessage {
" LEFT JOIN identity ON identity.id = message.identity" + " LEFT JOIN identity ON identity.id = message.identity" +
" JOIN folder ON folder.id = message.folder" + " JOIN folder ON folder.id = message.folder" +
" WHERE account.`synchronize`" + " WHERE account.`synchronize`" +
" AND (:threading OR (:type IS NULL AND folder.unified) OR (:type IS NOT NULL AND folder.type = :type))" +
" AND (NOT message.ui_hide OR :debug)" + " AND (NOT message.ui_hide OR :debug)" +
" AND (NOT :found OR ui_found = :found)" + " AND (NOT :found OR ui_found = :found)" +
" GROUP BY account.id, CASE WHEN message.thread IS NULL OR NOT :threading THEN message.id ELSE message.thread END" + " GROUP BY account.id, CASE WHEN message.thread IS NULL OR NOT :threading THEN message.id ELSE message.thread END" +
@ -113,6 +114,7 @@ public interface DaoMessage {
" JOIN folder ON folder.id = message.folder" + " JOIN folder ON folder.id = message.folder" +
" JOIN folder AS f ON f.id = :folder" + " JOIN folder AS f ON f.id = :folder" +
" WHERE (message.account = f.account OR " + is_outbox + ")" + " WHERE (message.account = f.account OR " + is_outbox + ")" +
" AND (:threading OR folder.id = :folder)" +
" AND (NOT message.ui_hide OR :debug)" + " AND (NOT message.ui_hide OR :debug)" +
" AND (NOT :found OR ui_found = :found)" + " AND (NOT :found OR ui_found = :found)" +
" GROUP BY CASE WHEN message.thread IS NULL OR NOT :threading THEN message.id ELSE message.thread END" + " GROUP BY CASE WHEN message.thread IS NULL OR NOT :threading THEN message.id ELSE message.thread END" +