Browse Source

Consider messages in archive as seen

main
M66B 6 years ago
parent
commit
bcae943c1b
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      app/src/main/java/eu/faircode/email/DaoMessage.java

+ 2
- 0
app/src/main/java/eu/faircode/email/DaoMessage.java View File

@ -40,6 +40,7 @@ public interface DaoMessage {
", folder.name as folderName, folder.type as folderType" +
", COUNT(message.id) as count" +
", SUM(CASE WHEN message.ui_seen" +
" OR folder.type = '" + EntityFolder.ARCHIVE + "'" +
" OR folder.type = '" + EntityFolder.OUTBOX + "'" +
" OR folder.type = '" + EntityFolder.DRAFTS + "' THEN 0 ELSE 1 END) as unseen" +
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +
@ -63,6 +64,7 @@ public interface DaoMessage {
", folder.name as folderName, folder.type as folderType" +
", COUNT(message.id) as count" +
", SUM(CASE WHEN message.ui_seen" +
" OR (folder.id <> :folder AND folder.type = '" + EntityFolder.ARCHIVE + "')" +
" OR (folder.id <> :folder AND folder.type = '" + EntityFolder.OUTBOX + "')" +
" OR (folder.id <> :folder AND folder.type = '" + EntityFolder.DRAFTS + "') THEN 0 ELSE 1 END) as unseen" +
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +


Loading…
Cancel
Save