Always update existing local contacts

This commit is contained in:
M66B 2022-03-27 21:28:29 +02:00
parent cc5db29320
commit 7724e5b46f
1 changed files with 7 additions and 2 deletions

View File

@ -587,8 +587,13 @@ public class FragmentContacts extends FragmentBase {
EntityContact contact;
if (id > 0)
contact = db.contact().getContact(id);
else
contact = new EntityContact();
else {
contact = db.contact().getContact(account, type, email);
if (contact == null)
contact = new EntityContact();
else
id = contact.id;
}
contact.account = account;
contact.type = type;