Report new email only

Fixes #20
This commit is contained in:
M66B
2018-08-07 18:31:14 +00:00
parent 7f76fbbc98
commit 847db6be1f
6 changed files with 733 additions and 20 deletions

View File

@@ -55,8 +55,11 @@ public interface DaoAccount {
" JOIN account ON account.id = message.account" +
" WHERE synchronize) AS operations" +
", (SELECT COUNT(*) FROM message" +
" JOIN account ON account.id = message.account" +
" JOIN folder ON folder.id = message.folder" +
" WHERE NOT ui_seen AND folder.type = '" + EntityFolder.TYPE_INBOX + "') AS unseen")
" WHERE NOT message.ui_seen AND NOT message.ui_hide" +
" AND (account.seen_until IS NULL OR message.received > account.seen_until)" +
" AND folder.type = '" + EntityFolder.TYPE_INBOX + "') AS unseen")
LiveData<TupleAccountStats> liveStats();
@Insert(onConflict = OnConflictStrategy.REPLACE)