Mark messages of enabled accounts read only

This commit is contained in:
M66B 2020-06-17 18:39:01 +02:00
parent e933b53250
commit af057c9f10
1 changed files with 4 additions and 2 deletions

View File

@ -341,9 +341,11 @@ public interface DaoMessage {
@Query("SELECT message.id" +
" FROM message" +
" JOIN folder_view AS folder ON folder.id = message.folder" +
" JOIN account ON account.id = message.account" +
" LEFT JOIN identity_view AS identity ON identity.id = message.identity" +
" WHERE CASE" +
" JOIN folder_view AS folder ON folder.id = message.folder" +
" WHERE account.`synchronize`" +
" AND CASE" +
" WHEN :folder IS NOT NULL THEN folder.id = :folder" +
" WHEN :type IS NOT NULL THEN folder.type = :type" +
" ELSE folder.unified" +