mirror of https://github.com/M66B/FairEmail.git
Count individual messages when no message ID
This commit is contained in:
parent
ffe2e25413
commit
c557adb16d
|
@ -55,7 +55,7 @@ public interface DaoMessage {
|
|||
", " + unflagged_unified + " AS unflagged" +
|
||||
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +
|
||||
", SUM(CASE WHEN folder.type = '" + EntityFolder.DRAFTS + "' THEN 1 ELSE 0 END) AS drafts" +
|
||||
", COUNT(DISTINCT CASE WHEN message.msgid IS NULL THEN '' ELSE message.msgid END) AS visible" +
|
||||
", COUNT(DISTINCT CASE WHEN message.msgid IS NULL THEN message.id ELSE message.msgid END) AS visible" +
|
||||
", MAX(CASE WHEN :found OR folder.unified THEN message.received ELSE 0 END) AS dummy" +
|
||||
" FROM message" +
|
||||
" JOIN account ON account.id = message.account" +
|
||||
|
@ -95,7 +95,7 @@ public interface DaoMessage {
|
|||
", " + unflagged_folder + " AS unflagged" +
|
||||
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +
|
||||
", SUM(CASE WHEN folder.type = '" + EntityFolder.DRAFTS + "' THEN 1 ELSE 0 END) AS drafts" +
|
||||
", COUNT(DISTINCT CASE WHEN message.msgid IS NULL THEN '' ELSE message.msgid END) AS visible" +
|
||||
", COUNT(DISTINCT CASE WHEN message.msgid IS NULL THEN message.id ELSE message.msgid END) AS visible" +
|
||||
", MAX(CASE WHEN folder.id = :folder THEN message.received ELSE 0 END) AS dummy" +
|
||||
" FROM message" +
|
||||
" JOIN account ON account.id = message.account" +
|
||||
|
|
Loading…
Reference in New Issue