From 76301089b8e7d332e92746952db37eafae949421 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 18 Dec 2019 08:35:00 +0100 Subject: [PATCH] Fixed counts in single message mode (2) --- app/src/main/java/eu/faircode/email/DaoMessage.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/DaoMessage.java b/app/src/main/java/eu/faircode/email/DaoMessage.java index 831fc9341d..861fb0ec24 100644 --- a/app/src/main/java/eu/faircode/email/DaoMessage.java +++ b/app/src/main/java/eu/faircode/email/DaoMessage.java @@ -65,6 +65,7 @@ public interface DaoMessage { " LEFT JOIN identity ON identity.id = message.identity" + " JOIN folder ON folder.id = message.folder" + " 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 :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" + @@ -113,6 +114,7 @@ public interface DaoMessage { " JOIN folder ON folder.id = message.folder" + " JOIN folder AS f ON f.id = :folder" + " WHERE (message.account = f.account OR " + is_outbox + ")" + + " AND (:threading OR folder.id = :folder)" + " AND (NOT message.ui_hide OR :debug)" + " 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" +