From 6d68db87ecc089f14aaade075aac1cf5765faeb0 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 23 Aug 2019 14:14:05 +0200 Subject: [PATCH] Prevent setting empty contact names on update --- app/src/main/java/eu/faircode/email/Core.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index be169ce775..2d9b7e4ed6 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -1807,7 +1807,8 @@ class Core { contact.id = db.contact().insertContact(contact); Log.i("Inserted contact=" + contact + " type=" + type); } else { - contact.name = name; + if (!TextUtils.isEmpty(name)) + contact.name = name; contact.avatar = (avatar == null ? null : avatar.toString()); contact.times_contacted++; contact.first_contacted = Math.min(contact.first_contacted, message.received);