Batch notify new messages

This commit is contained in:
M66B
2019-03-20 14:52:51 +00:00
parent 68cf08526e
commit 3c63f4bfe3
2 changed files with 19 additions and 1 deletions

View File

@@ -89,6 +89,11 @@ public interface DaoFolder {
" AND folder.type = '" + EntityFolder.DRAFTS + "'")
LiveData<EntityFolder> livePrimaryDrafts();
@Query("SELECT COUNT(id) FROM folder" +
" WHERE sync_state = 'syncing'" +
" AND folder.type <> '" + EntityFolder.OUTBOX + "'")
LiveData<Integer> liveSynchronizing();
@Query("SELECT folder.*" +
", account.name AS accountName, account.color AS accountColor, account.state AS accountState" +
", COUNT(message.id) AS messages" +