Added basic new email notification

This commit is contained in:
M66B
2018-08-05 08:53:43 +00:00
parent b66ec74f98
commit 210cf6ee20
4 changed files with 30 additions and 17 deletions

View File

@@ -49,8 +49,14 @@ public interface DaoAccount {
LiveData<EntityAccount> liveFirstAccount();
@Query("SELECT" +
" (SELECT COUNT(*) FROM account WHERE synchronize) AS accounts," +
" (SELECT COUNT(*) FROM operation JOIN message ON message.id = operation.message JOIN account ON account.id = message.account WHERE synchronize) AS operations")
" (SELECT COUNT(*) FROM account WHERE synchronize) AS accounts" +
", (SELECT COUNT(*) FROM operation" +
" JOIN message ON message.id = operation.message" +
" JOIN account ON account.id = message.account" +
" WHERE synchronize) AS operations" +
", (SELECT COUNT(*) FROM message" +
" JOIN folder ON folder.id = message.folder" +
" WHERE NOT ui_seen AND folder.type = '" + EntityFolder.TYPE_INBOX + "') AS unseen")
LiveData<TupleAccountStats> liveStats();
@Insert(onConflict = OnConflictStrategy.REPLACE)