mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 14:46:31 +02:00
Show when folder is executing operations
This commit is contained in:
@@ -63,6 +63,7 @@ public interface DaoFolder {
|
||||
", COUNT(message.id) AS messages" +
|
||||
", SUM(CASE WHEN message.content = 1 THEN 1 ELSE 0 END) AS content" +
|
||||
", SUM(CASE WHEN message.ui_seen = 0 THEN 1 ELSE 0 END) AS unseen" +
|
||||
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id AND operation.state = 'executing') AS executing" +
|
||||
", (SELECT COUNT(child.id) FROM folder child WHERE child.parent = folder.id) AS childs" +
|
||||
" FROM folder" +
|
||||
" LEFT JOIN account ON account.id = folder.account" +
|
||||
@@ -80,6 +81,7 @@ public interface DaoFolder {
|
||||
", COUNT(message.id) AS messages" +
|
||||
", SUM(CASE WHEN message.content = 1 THEN 1 ELSE 0 END) AS content" +
|
||||
", SUM(CASE WHEN message.ui_seen = 0 THEN 1 ELSE 0 END) AS unseen" +
|
||||
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id AND operation.state = 'executing') AS executing" +
|
||||
", (SELECT COUNT(child.id) FROM folder child WHERE child.parent = folder.id) AS childs" +
|
||||
" FROM folder" +
|
||||
" JOIN account ON account.id = folder.account" +
|
||||
@@ -92,7 +94,8 @@ public interface DaoFolder {
|
||||
@Query("SELECT folder.*" +
|
||||
", account.`order` AS accountOrder, account.name AS accountName, account.color AS accountColor" +
|
||||
", SUM(CASE WHEN message.ui_seen = 0 THEN 1 ELSE 0 END) AS unseen" +
|
||||
", (SELECT COUNT(*) FROM operation WHERE operation.folder = folder.id) AS operations" +
|
||||
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id) AS operations" +
|
||||
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id AND operation.state = 'executing') AS executing" +
|
||||
" FROM folder" +
|
||||
" LEFT JOIN account ON account.id = folder.account" +
|
||||
" LEFT JOIN message ON message.folder = folder.id AND NOT message.ui_hide" +
|
||||
@@ -118,6 +121,7 @@ public interface DaoFolder {
|
||||
", COUNT(message.id) AS messages" +
|
||||
", SUM(CASE WHEN message.content = 1 THEN 1 ELSE 0 END) AS content" +
|
||||
", SUM(CASE WHEN message.ui_seen = 0 THEN 1 ELSE 0 END) AS unseen" +
|
||||
", (SELECT COUNT(operation.id) FROM operation WHERE operation.folder = folder.id AND operation.state = 'executing') AS executing" +
|
||||
", (SELECT COUNT(child.id) FROM folder child WHERE child.parent = folder.id) AS childs" +
|
||||
" FROM folder" +
|
||||
" LEFT JOIN account ON account.id = folder.account" +
|
||||
|
||||
Reference in New Issue
Block a user