From 2f4958d52d028d28bc204651d2e0331dfd4bbded Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Thu, 29 Jun 2006 21:47:41 +0000 Subject: [PATCH] Bug 343170 --> message tags shown twice in the message header if the tag is one of the old style labels. sr=bienvenu git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@201297 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mail/base/content/msgHdrViewOverlay.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mozilla/mail/base/content/msgHdrViewOverlay.js b/mozilla/mail/base/content/msgHdrViewOverlay.js index f598255535d..00ac96cb698 100644 --- a/mozilla/mail/base/content/msgHdrViewOverlay.js +++ b/mozilla/mail/base/content/msgHdrViewOverlay.js @@ -531,14 +531,14 @@ function setTagHeader() var tagsString = ""; // extract the tags from the msg hdr - var tags = msgHdr.getStringProperty('keywords'); - + var tags = msgHdr.getStringProperty('keywords'); var label = msgHdr.label; if (label > 0) { - var labelTag = '$label' + label + '0'; - tagsString = encodeURIComponent(gPrefBranch.getComplexValue("mailnews.labels.description." + label, - Components.interfaces.nsIPrefLocalizedString).data); + var labelTag = '$label' + label; + if (!tags.search(labelTag)) // don't add the label if it's already in our keyword list + tagsString = encodeURIComponent(gPrefBranch.getComplexValue("mailnews.labels.description." + label, + Components.interfaces.nsIPrefLocalizedString).data); } // now convert the list of tag ids into user presentable strings, separate by commas