diff options
Diffstat (limited to 'mailnews/base')
-rw-r--r-- | mailnews/base/src/nsMsgDBView.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mailnews/base/src/nsMsgDBView.cpp b/mailnews/base/src/nsMsgDBView.cpp index 76a843df7..a1867244b 100644 --- a/mailnews/base/src/nsMsgDBView.cpp +++ b/mailnews/base/src/nsMsgDBView.cpp @@ -400,10 +400,12 @@ nsresult nsMsgDBView::FetchAuthor(nsIMsgDBHdr * aHdr, nsAString &aSenderString) nsCString headerCharset; aHdr->GetEffectiveCharset(headerCharset); - nsCString emailAddress; nsString name; - ExtractFirstAddress(EncodedHeader(author, headerCharset.get()), name, - emailAddress); + nsCString emailAddress; + nsCOMArray<msgIAddressObject> addresses = EncodedHeader(author, headerCharset.get()); + bool multipleAuthors = addresses.Length() > 1; + + ExtractFirstAddress(addresses, name, emailAddress); if (showCondensedAddresses) GetDisplayNameInAddressBook(emailAddress, aSenderString); @@ -429,6 +431,12 @@ nsresult nsMsgDBView::FetchAuthor(nsIMsgDBHdr * aHdr, nsAString &aSenderString) } } + if (multipleAuthors) + { + aSenderString.AppendLiteral(" "); + aSenderString.Append(GetString(u"andOthers")); + } + UpdateCachedName(aHdr, "sender_name", aSenderString); return NS_OK; |