Bug 690277 - Multiple (duplicate) Address Book Entries In "do not mark mail as junk if the sender is in" (Account settings -> Junk settings). r=Standard8
authorDan Callahan <dan.callahan@gmail.com>
Mon, 31 Oct 2011 16:17:30 +0000
changeset 8741 2edbbb6c5f596a175526afed535472be932bb5b4
parent 8740 4055e0843ad8abef2f15dfbfe0f78f69911e7920
child 8742 9891f11fc4c6c61b6ad412f8102171496b8c2e86
push id6724
push userbugzilla@standard8.plus.com
push dateMon, 31 Oct 2011 16:18:58 +0000
treeherdercomm-central@9891f11fc4c6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
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=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;