Fixed global search

This commit is contained in:
M66B
2019-12-26 19:13:41 +01:00
parent 053d0704b8
commit 9ea63d927e
2 changed files with 6 additions and 2 deletions

View File

@@ -65,7 +65,7 @@ public interface DaoMessage {
" LEFT JOIN identity ON identity.id = message.identity" +
" JOIN folder ON folder.id = message.folder" +
" WHERE account.`synchronize`" +
" AND (:threading OR (:type IS NULL AND folder.unified) OR (:type IS NOT NULL AND folder.type = :type))" +
" AND (:threading OR (:type IS NULL AND (folder.unified OR :found)) OR (:type IS NOT NULL AND folder.type = :type))" +
" AND (NOT message.ui_hide OR :debug)" +
" AND (NOT :found OR ui_found = :found)" +
" GROUP BY account.id, CASE WHEN message.thread IS NULL OR NOT :threading THEN message.id ELSE message.thread END" +