Fixed browsing messages

This commit is contained in:
M66B
2019-01-23 09:31:31 +00:00
parent 9dae0fe60c
commit 8f238c7e3f
2 changed files with 3 additions and 6 deletions

View File

@@ -52,11 +52,8 @@ public interface DaoFolder {
@Query("SELECT folder.* FROM folder" +
" JOIN account ON account.id = folder.account" +
" WHERE ((:folder IS NULL AND unified) OR (NOT :folder is NULL AND folder.id = :folder))" +
" AND :search" +
" OR (folder.synchronize" +
" AND account.synchronize" +
" AND account.browse)")
List<EntityFolder> getFolders(Long folder, boolean search);
" AND (:search OR (account.synchronize AND account.browse))")
List<EntityFolder> getBrowsableFolders(Long folder, boolean search);
@Query("SELECT folder.*, account.name AS accountName, account.color AS accountColor, account.state AS accountState" +
", COUNT(message.id) AS messages" +