Added color stripe to unified inbox widget

This commit is contained in:
M66B
2020-05-15 15:32:58 +02:00
parent 2aa012a12d
commit 2b8d531d2c
6 changed files with 76 additions and 48 deletions

View File

@@ -460,12 +460,14 @@ public interface DaoMessage {
@Query("SELECT message.*" +
", account.name AS accountName" +
", COALESCE(identity.color, folder.color, account.color) AS accountColor" +
", SUM(1 - message.ui_seen) AS unseen" +
", COUNT(message.id) - SUM(message.ui_flagged) AS unflagged" +
", MAX(message.received) AS dummy" +
" FROM message" +
" JOIN account_view AS account ON account.id = message.account" +
" JOIN folder_view AS folder ON folder.id = message.folder" +
" LEFT JOIN identity ON identity.id = message.identity" +
" WHERE account.`synchronize`" +
" AND (:account IS NULL OR account.id = :account)" +
" AND ((:folder IS NULL AND folder.unified) OR folder.id = :folder)" +