mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-24 16:53:37 +00:00
Fixed account unread count in some situation
This commit is contained in:
parent
d0487795e0
commit
bb7d590da3
1 changed files with 4 additions and 1 deletions
|
@ -48,7 +48,10 @@ public interface DaoAccount {
|
|||
LiveData<List<EntityAccount>> liveSynchronizingAccounts();
|
||||
|
||||
@Query("SELECT account.*" +
|
||||
", (SELECT COUNT(DISTINCT CASE WHEN message.msgid IS NULL THEN message.id ELSE message.msgid END)" +
|
||||
", (SELECT COUNT(DISTINCT" +
|
||||
" CASE WHEN NOT message.hash IS NULL THEN message.hash" +
|
||||
" WHEN NOT message.msgid IS NULL THEN message.msgid" +
|
||||
" ELSE message.id END)" +
|
||||
" FROM message" +
|
||||
" JOIN folder ON folder.id = message.folder" +
|
||||
" WHERE message.account = account.id" +
|
||||
|
|
Loading…
Reference in a new issue