From 45c4a9988af5c12989c3928b32dabce2aaf6e94b Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 8 Aug 2020 16:28:03 +0200 Subject: [PATCH] Prevent read error --- app/src/main/java/eu/faircode/email/DaoFolder.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/DaoFolder.java b/app/src/main/java/eu/faircode/email/DaoFolder.java index e17b360f4c..52c3dee326 100644 --- a/app/src/main/java/eu/faircode/email/DaoFolder.java +++ b/app/src/main/java/eu/faircode/email/DaoFolder.java @@ -23,6 +23,7 @@ import androidx.lifecycle.LiveData; import androidx.room.Dao; import androidx.room.Insert; import androidx.room.Query; +import androidx.room.Transaction; import java.util.List; @@ -72,6 +73,7 @@ public interface DaoFolder { " WHERE account.`synchronize`") List getSortedFolders(); + @Transaction @Query("SELECT folder.*" + ", account.id AS accountId, account.pop AS accountProtocol, account.`order` AS accountOrder" + ", account.name AS accountName, account.state AS accountState" +