mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Added favorite local contacts
This commit is contained in:
@@ -35,11 +35,11 @@ public interface DaoContact {
|
||||
List<EntityContact> getContacts();
|
||||
|
||||
@Query("SELECT * FROM contact" +
|
||||
" ORDER BY times_contacted DESC, last_contacted DESC")
|
||||
" ORDER BY favorite DESC, times_contacted DESC, last_contacted DESC")
|
||||
LiveData<List<EntityContact>> liveContacts();
|
||||
|
||||
@Query("SELECT * FROM contact" +
|
||||
" ORDER BY times_contacted DESC, last_contacted DESC" +
|
||||
" ORDER BY favorite DESC, times_contacted DESC, last_contacted DESC" +
|
||||
" LIMIT :count")
|
||||
List<EntityContact> getFrequentlyContacted(int count);
|
||||
|
||||
@@ -66,6 +66,9 @@ public interface DaoContact {
|
||||
@Update
|
||||
int updateContact(EntityContact contact);
|
||||
|
||||
@Query("UPDATE contact SET favorite = :favorite WHERE id = :id")
|
||||
int setContactFavorite(long id, boolean favorite);
|
||||
|
||||
@Query("DELETE from contact")
|
||||
int clearContacts();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user