From 1ebc7b923cfefbc6c042c7b7f2203dae945fd04d Mon Sep 17 00:00:00 2001 From: Humdinger Date: Sat, 7 Jun 2025 14:10:51 +0200 Subject: [PATCH] Mail: Avoid showing contacts' empty addresses Other contacts apps like Peeps! allow for more than one email addresses, using the attributes META:email{n} with n >=2. Only, not all contacts having those additional attributes have them actually filled. This results duplicate entries in e.g. the To-field pop-up with no email address attached. We now only add an item if its email address isn't empty for those additional email attributes as well. Change-Id: Icb1750fe8e2b10280bc01b3181b444f01096e021 Reviewed-on: https://review.haiku-os.org/c/haiku/+/9329 Tested-by: Commit checker robot Reviewed-by: waddlesplash --- src/apps/mail/People.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/mail/People.cpp b/src/apps/mail/People.cpp index 6c0ce39a66..1fb06d466f 100644 --- a/src/apps/mail/People.cpp +++ b/src/apps/mail/People.cpp @@ -36,7 +36,7 @@ AddPersonAddresses(BNode& node, BStringList& addresses) char attr[32]; snprintf(attr, sizeof(attr), "META:email%d", i); - if (node.ReadAttrString(attr, &email) != B_OK) + if (node.ReadAttrString(attr, &email) != B_OK || email.IsEmpty()) break; addresses.Add(email);