Undo query changes

This commit is contained in:
M66B
2019-06-28 11:00:55 +02:00
parent 893980f6d6
commit 2498e5be3b
2 changed files with 3 additions and 6 deletions

View File

@@ -60,9 +60,8 @@ 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" +
" LEFT JOIN folder AS drafts ON drafts.account = account.id AND drafts.type = '" + EntityFolder.DRAFTS + "'" +
" WHERE :all OR account.synchronize" +
" AND (drafts.type = '" + EntityFolder.DRAFTS + "' OR drafts.type IS NULL)" +
" 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" +