From ca8742dca447a04a977b448dd69170f25a679663 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 28 Sep 2018 15:28:33 +0000 Subject: [PATCH] Fixed message count --- app/src/main/java/eu/faircode/email/DaoMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/DaoMessage.java b/app/src/main/java/eu/faircode/email/DaoMessage.java index 5af5f04a..0f4dbc09 100644 --- a/app/src/main/java/eu/faircode/email/DaoMessage.java +++ b/app/src/main/java/eu/faircode/email/DaoMessage.java @@ -99,7 +99,7 @@ public interface DaoMessage { ", account.name AS accountName, account.color AS accountColor" + ", folder.name AS folderName, folder.display AS folderDisplay, folder.type AS folderType" + ", 0 AS threaded" + - ", 1 AS count" + + ", (SELECT COUNT(m1.id) FROM message m1 WHERE m1.account = message.account AND m1.thread = message.thread AND NOT m1.ui_hide) AS count" + ", CASE WHEN message.ui_seen THEN 0 ELSE 1 END AS unseen" + ", CASE WHEN message.ui_flagged THEN 0 ELSE 1 END AS unflagged" + ", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +