Bug 1562326 - Disable the Biff units too when the option is unchecked. r=jorgk DONTBUILD
authorRichard Marti <richard.marti@gmail.com>
Sat, 29 Jun 2019 09:39:16 +0200
changeset 35983 6f3db64fae5570292b31c3ef06ce1bf5f8fabf84
parent 35982 0e2572d4a88f1525e86de53027d4ac730164a600
child 35984 b7fc532744f4cbca9c88d55a7c14d6fce446bed2
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1562326
Bug 1562326 - Disable the Biff units too when the option is unchecked. r=jorgk DONTBUILD
mailnews/extensions/newsblog/content/am-newsblog.js
--- a/mailnews/extensions/newsblog/content/am-newsblog.js
+++ b/mailnews/extensions/newsblog/content/am-newsblog.js
@@ -35,16 +35,18 @@ function onInit(aPageId, aServerId) {
 
   gUpdateEnabled.checked = optionsAcct.updates.enabled;
   gBiffUnits.value = optionsAcct.updates.updateUnits;
   let minutes = optionsAcct.updates.updateUnits == FeedUtils.kBiffUnitsMinutes ?
                   optionsAcct.updates.updateMinutes :
                   optionsAcct.updates.updateMinutes / (24 * 60);
   gUpdateValue.value = Number(minutes);
   onCheckItem("updateValue", ["updateEnabled"]);
+  onCheckItem("biffMinutes", ["updateEnabled"]);
+  onCheckItem("biffDays", ["updateEnabled"]);
 
   gAutotagEnable.checked = optionsAcct.category.enabled;
   gAutotagUsePrefix.disabled = !gAutotagEnable.checked;
   gAutotagUsePrefix.checked = optionsAcct.category.prefixEnabled;
   gAutotagPrefix.disabled = gAutotagUsePrefix.disabled || !gAutotagUsePrefix.checked;
   gAutotagPrefix.value = optionsAcct.category.prefix;
 }
 
@@ -58,16 +60,18 @@ function setPrefs(aNode) {
     case "doBiff":
       FeedUtils.pauseFeedFolderUpdates(gAccount.incomingServer.rootFolder, !aNode.checked, true);
       break;
     case "updateEnabled":
     case "updateValue":
     case "biffUnits":
       optionsAcct.updates.enabled = gUpdateEnabled.checked;
       onCheckItem("updateValue", ["updateEnabled"]);
+      onCheckItem("biffMinutes", ["updateEnabled"]);
+      onCheckItem("biffDays", ["updateEnabled"]);
       let minutes = gBiffUnits.value == FeedUtils.kBiffUnitsMinutes ?
                       gUpdateValue.value :
                       gUpdateValue.value * 24 * 60;
       optionsAcct.updates.updateMinutes = Number(minutes);
       optionsAcct.updates.updateUnits = gBiffUnits.value;
       break;
     case "autotagEnable":
       optionsAcct.category.enabled = aNode.checked;