Bug 690277 - Multiple (duplicate) Address Book Entries In "do not mark mail as junk if the sender is in" (Account settings -> Junk settings). r+a=Standard8
authorDan Callahan <dan.callahan@gmail.com>
Mon, 31 Oct 2011 16:17:30 +0000
changeset 8966 2deefa1ecd9aeef2eaedd8cbd628b8b409258e17
parent 8963 71e85d3e50f798a1f01e3b2a9ce549732511705e
child 8967 2d6c6de72c8bfa771b449e9b1891b17fe89095cd
push idunknown
push userunknown
push dateunknown
bugs690277
Bug 690277 - Multiple (duplicate) Address Book Entries In "do not mark mail as junk if the sender is in" (Account settings -> Junk settings). r+a=Standard8
mailnews/base/prefs/content/am-junk.js
--- a/mailnews/base/prefs/content/am-junk.js
+++ b/mailnews/base/prefs/content/am-junk.js
@@ -85,16 +85,20 @@ function onInit(aPageId, aServerId)
 
   var currentArray = [];
   if (document.getElementById("server.useWhiteList").checked)
     currentArray = document.getElementById("server.whiteListAbURI").value.split(" ");
 
   // set up the whitelist UI
   var wList = document.getElementById("whiteListAbURI");
 
+  // Ensure the whitelist is empty
+  while (wList.lastChild)
+    wList.removeChild(wList.lastChild);
+
   // Populate the listbox with address books
   let abItems = [];
   for (let ab in fixIterator(MailServices.ab.directories,
                              Components.interfaces.nsIAbDirectory)) {
     // We skip mailing lists and remote address books.
     if (ab.isMailList || ab.isRemote)
       continue;