Prevent setting empty contact names on update

This commit is contained in:
M66B 2019-08-23 14:14:05 +02:00
parent eb4bdd5a82
commit 6d68db87ec
1 changed files with 2 additions and 1 deletions

View File

@ -1807,6 +1807,7 @@ class Core {
contact.id = db.contact().insertContact(contact); contact.id = db.contact().insertContact(contact);
Log.i("Inserted contact=" + contact + " type=" + type); Log.i("Inserted contact=" + contact + " type=" + type);
} else { } else {
if (!TextUtils.isEmpty(name))
contact.name = name; contact.name = name;
contact.avatar = (avatar == null ? null : avatar.toString()); contact.avatar = (avatar == null ? null : avatar.toString());
contact.times_contacted++; contact.times_contacted++;