mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 23:50:58 +01:00
Refactoring
This commit is contained in:
@@ -40,12 +40,12 @@ public interface DaoMessage {
|
||||
", COUNT(message.id) as count" +
|
||||
", SUM(CASE WHEN message.ui_seen THEN 0 ELSE 1 END) as unseen" +
|
||||
", (SELECT COUNT(a.id) FROM attachment a WHERE a.message = message.id) AS attachments" +
|
||||
", MAX(CASE WHEN folder.type = '" + EntityFolder.TYPE_INBOX + "' THEN message.id ELSE 0 END) as dummy" +
|
||||
", MAX(CASE WHEN folder.type = '" + EntityFolder.INBOX + "' THEN message.id ELSE 0 END) as dummy" +
|
||||
" FROM message" +
|
||||
" JOIN folder ON folder.id = message.folder" +
|
||||
" WHERE (NOT message.ui_hide OR :debug)" +
|
||||
" GROUP BY CASE WHEN message.thread IS NULL THEN message.id ELSE message.thread END" +
|
||||
" HAVING SUM(CASE WHEN folder.type = '" + EntityFolder.TYPE_INBOX + "' THEN 1 ELSE 0 END) > 0" +
|
||||
" HAVING SUM(CASE WHEN folder.type = '" + EntityFolder.INBOX + "' THEN 1 ELSE 0 END) > 0" +
|
||||
" ORDER BY message.received DESC")
|
||||
DataSource.Factory<Integer, TupleMessageEx> pagedUnifiedInbox(boolean debug);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user