Sort frequently contacted on lookup URI

This commit is contained in:
M66B
2019-03-17 09:49:50 +00:00
parent cc1264698c
commit 2ac17dda85
4 changed files with 1644 additions and 1 deletions

View File

@@ -45,6 +45,7 @@ public interface DaoContact {
" WHERE state <> " + EntityContact.STATE_IGNORE +
" ORDER BY" +
" CASE WHEN state = " + EntityContact.STATE_FAVORITE + " THEN 0 ELSE 1 END" +
", CASE WHEN avatar IS NULL THEN 1 ELSE 0 END" +
", times_contacted DESC" +
", last_contacted DESC" +
" LIMIT :count")