From 71e83e2c7f2c35492c95e0debd493aeeb0fc1d8f Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 14 Jan 2019 13:25:13 +0000 Subject: [PATCH] Synchronize folders of enabled accounts only --- app/src/main/java/eu/faircode/email/DaoFolder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/DaoFolder.java b/app/src/main/java/eu/faircode/email/DaoFolder.java index f8413c9289..3c6937b7a7 100644 --- a/app/src/main/java/eu/faircode/email/DaoFolder.java +++ b/app/src/main/java/eu/faircode/email/DaoFolder.java @@ -39,7 +39,9 @@ public interface DaoFolder { " ORDER BY CASE WHEN folder.type = '" + EntityFolder.USER + "' THEN 1 ELSE 0 END") List getFolders(long account, boolean synchronize); - @Query("SELECT * FROM folder WHERE synchronize") + @Query("SELECT folder.* FROM folder" + + " JOIN account ON account.id = folder.account" + + " WHERE account.synchronize AND folder.synchronize") List getFoldersSynchronizing(); @Query("SELECT folder.* FROM folder" +