From bed0bd84c1c4a33986606f491c5cee554deeba72 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 16 Aug 2018 14:53:05 +0000 Subject: [PATCH] Identities will only synchronize of account is synchronizing --- app/src/main/java/eu/faircode/email/DaoIdentity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/DaoIdentity.java b/app/src/main/java/eu/faircode/email/DaoIdentity.java index d85cf033..a1f9cbe9 100644 --- a/app/src/main/java/eu/faircode/email/DaoIdentity.java +++ b/app/src/main/java/eu/faircode/email/DaoIdentity.java @@ -33,7 +33,10 @@ public interface DaoIdentity { " JOIN account ON account.id = identity.account") LiveData> liveIdentities(); - @Query("SELECT * FROM identity WHERE synchronize = :synchronize") + @Query("SELECT identity.* FROM identity" + + " JOIN account ON account.id = identity.account" + + " WHERE account.synchronize = :synchronize" + + " AND identity.synchronize = :synchronize") LiveData> liveIdentities(boolean synchronize); @Query("SELECT * FROM identity")