mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-27 08:01:50 +01:00
Show unread count per account
This commit is contained in:
@@ -41,8 +41,18 @@ public interface DaoAccount {
|
||||
@Query("SELECT * FROM account")
|
||||
LiveData<List<EntityAccount>> liveAccounts();
|
||||
|
||||
@Query("SELECT * FROM account WHERE synchronize = :synchronize")
|
||||
LiveData<List<EntityAccount>> liveAccounts(boolean synchronize);
|
||||
@Query("SELECT *" +
|
||||
", (SELECT COUNT(message.id)" +
|
||||
" FROM message" +
|
||||
" JOIN folder ON folder.id = message.folder" +
|
||||
" WHERE message.account = account.id" +
|
||||
" AND folder.type <> '" + EntityFolder.ARCHIVE + "'" +
|
||||
" AND folder.type <> '" + EntityFolder.TRASH + "'" +
|
||||
" AND folder.type <> '" + EntityFolder.DRAFTS + "'" +
|
||||
" AND NOT ui_seen) AS unseen" +
|
||||
" FROM account" +
|
||||
" WHERE synchronize = :synchronize")
|
||||
LiveData<List<TupleAccountEx>> liveAccounts(boolean synchronize);
|
||||
|
||||
@Query("SELECT * FROM account WHERE id = :id")
|
||||
EntityAccount getAccount(long id);
|
||||
|
||||
Reference in New Issue
Block a user