mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 11:28:41 +01:00
Better consult an SQL guru like Leo ...
This commit is contained in:
@@ -60,8 +60,9 @@ public interface DaoAccount {
|
||||
" AND identity.synchronize) AS identities" +
|
||||
", CASE WHEN drafts.id IS NULL THEN 0 ELSE 1 END AS drafts" +
|
||||
" FROM account" +
|
||||
" LEFT JOIN folder AS drafts ON drafts.account = account.id AND drafts.type = '" + EntityFolder.DRAFTS + "'" +
|
||||
" LEFT JOIN folder AS drafts ON drafts.account = account.id" +
|
||||
" WHERE :all OR account.synchronize" +
|
||||
" AND drafts.type = '" + EntityFolder.DRAFTS + "'" +
|
||||
" GROUP BY account.id" +
|
||||
" ORDER BY CASE WHEN :all THEN 0 ELSE account.`order` END" +
|
||||
", CASE WHEN :all THEN 0 ELSE account.`primary` END DESC" +
|
||||
|
||||
Reference in New Issue
Block a user