diff --git a/app/src/main/java/eu/faircode/email/DaoContact.java b/app/src/main/java/eu/faircode/email/DaoContact.java index 198b0555a3..5dd79a5d64 100644 --- a/app/src/main/java/eu/faircode/email/DaoContact.java +++ b/app/src/main/java/eu/faircode/email/DaoContact.java @@ -43,6 +43,8 @@ public interface DaoContact { @Query("SELECT email, name, avatar FROM contact" + " WHERE state <> " + EntityContact.STATE_IGNORE + + " AND (type = " + EntityContact.TYPE_TO + + " OR type = " + EntityContact.TYPE_FROM + ")" + " ORDER BY" + " CASE WHEN state = " + EntityContact.STATE_FAVORITE + " THEN 0 ELSE 1 END" + ", CASE WHEN avatar IS NULL THEN 1 ELSE 0 END" +