1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 01:36:55 +00:00

Fixed account unread count in some situation

This commit is contained in:
M66B 2020-10-17 17:20:07 +02:00
parent d0487795e0
commit bb7d590da3

View file

@ -48,7 +48,10 @@ public interface DaoAccount {
LiveData<List<EntityAccount>> liveSynchronizingAccounts(); LiveData<List<EntityAccount>> liveSynchronizingAccounts();
@Query("SELECT account.*" + @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" + " FROM message" +
" JOIN folder ON folder.id = message.folder" + " JOIN folder ON folder.id = message.folder" +
" WHERE message.account = account.id" + " WHERE message.account = account.id" +