Cleanup old local contacts

This commit is contained in:
M66B
2019-03-15 08:50:31 +00:00
parent a2d03f7af8
commit 40f1832ab7
5 changed files with 1619 additions and 3 deletions

View File

@@ -72,6 +72,12 @@ public interface DaoContact {
@Query("DELETE FROM contact WHERE id= :id")
int deleteContact(long id);
@Query("DELETE FROM contact" +
" WHERE last_contacted IS NOT NULL" +
" AND last_contacted < :before" +
" AND NOT favorite")
int deleteContacts(long before);
@Query("DELETE FROM contact")
int clearContacts();
}