Added contact editor

This commit is contained in:
M66B
2022-03-27 09:10:21 +02:00
parent 5c0eb6132f
commit 05f3677448
6 changed files with 235 additions and 54 deletions

View File

@@ -53,6 +53,9 @@ public interface DaoContact {
", last_contacted DESC")
Cursor getFrequentlyContacted();
@Query("SELECT * FROM contact WHERE id = :id")
EntityContact getContact(long id);
@Query("SELECT *" +
" FROM contact" +
" WHERE account = :account" +
@@ -89,9 +92,6 @@ public interface DaoContact {
" AND email = :email")
int deleteContact(long account, int type, String email);
@Query("UPDATE contact SET name = :name WHERE id = :id AND NOT (name IS :name)")
int setContactName(long id, String name);
@Query("UPDATE contact SET state = :state WHERE id = :id AND NOT (state IS :state)")
int setContactState(long id, int state);