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 CAL80_20111019_RELBRANCH
authorDan Callahan <dan.callahan@gmail.com>
Mon, 31 Oct 2011 16:17:30 +0000
branchCAL80_20111019_RELBRANCH
changeset 8964 42a8fe4e92153b86b5b42d588a473a9e49740bf2
parent 8952 8df2828fb9f04a45b6f1cb0a133fa2d55bff058c
child 8965 b8fb1520f73ac21969647e798cfd1daf56b3a0e1
push id213
push userbugzilla@standard8.plus.com
push dateMon, 31 Oct 2011 16:23:58 +0000
treeherdercomm-beta@b8fb1520f73a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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;