Sort searched contacts by name and email

pull/153/head
M66B 6 years ago
parent 2ac17dda85
commit 9f30511257

@ -68,7 +68,10 @@ public interface DaoContact {
" WHERE (:account IS NULL OR account = :account)" +
" AND (:type IS NULL OR type = :type)" +
" AND (email LIKE :query COLLATE NOCASE OR name LIKE :query COLLATE NOCASE)" +
" AND state <> " + EntityContact.STATE_IGNORE)
" AND state <> " + EntityContact.STATE_IGNORE +
" ORDER BY" +
" CASE WHEN name IS NULL THEN 1 ELSE 0 END" +
", name COLLATE NOCASE, email COLLATE NOCASE")
Cursor searchContacts(Long account, Integer type, String query);
@Insert

Loading…
Cancel
Save