1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Prevent suggesting junk contacts

This commit is contained in:
M66B 2021-09-19 07:43:43 +02:00
parent 5fbed5ef34
commit 36c248e56d

View file

@ -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" +