Bug 1445028 - Hide sync-dev-edition-root properly if sync is disabled. r=jaws a=jcristau
authorEdouard Oger <eoger@fastmail.com>
Tue, 13 Mar 2018 10:16:43 -0400
changeset 462640 5704da3fb8b7806181d824353447659cb79eb956
parent 462639 0ec90964e0bc479412a4da8a61d48b665211736e
child 462641 cea0eb9a967951b9b1f299509319eadfceba5408
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, jcristau
bugs1445028
milestone60.0
Bug 1445028 - Hide sync-dev-edition-root properly if sync is disabled. r=jaws a=jcristau MozReview-Commit-ID: 29ylwC3tJdM
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/main.xul
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -462,25 +462,22 @@ var gMainPane = {
 
       setEventListener("separateProfileMode", "command", gMainPane.separateProfileModeChange);
       let separateProfileModeCheckbox = document.getElementById("separateProfileMode");
       setEventListener("getStarted", "click", gMainPane.onGetStarted);
 
       OS.File.stat(ignoreSeparateProfile).then(() => separateProfileModeCheckbox.checked = false,
         () => separateProfileModeCheckbox.checked = true);
 
-      if (!Services.prefs.getBoolPref("identity.fxaccounts.enabled")) {
-        document.getElementById("sync-dev-edition-root").hidden = true;
-        return;
+      if (Services.prefs.getBoolPref("identity.fxaccounts.enabled")) {
+        document.getElementById("sync-dev-edition-root").hidden = false;
+        fxAccounts.getSignedInUser().then(data => {
+          document.getElementById("getStarted").selectedIndex = data ? 1 : 0;
+        }).catch(Cu.reportError);
       }
-
-      fxAccounts.getSignedInUser().then(data => {
-        document.getElementById("getStarted").selectedIndex = data ? 1 : 0;
-      })
-        .catch(Cu.reportError);
     }
 
     // Initialize the Firefox Updates section.
     let version = AppConstants.MOZ_APP_VERSION_DISPLAY;
 
     // Include the build ID if this is an "a#" (nightly) build
     if (/a\d+$/.test(version)) {
       let buildID = Services.appinfo.appBuildID;
--- a/browser/components/preferences/in-content/main.xul
+++ b/browser/components/preferences/in-content/main.xul
@@ -28,17 +28,17 @@
           data-category="paneGeneral"
           hidden="true">
   <caption><label data-l10n-id="startup-header"/></caption>
 
 #ifdef MOZ_DEV_EDITION
   <vbox id="separateProfileBox">
     <checkbox id="separateProfileMode"
               data-l10n-id="separate-profile-mode"/>
-    <hbox id="sync-dev-edition-root" lign="center" class="indent">
+    <hbox id="sync-dev-edition-root" lign="center" class="indent" hidden="true">
       <label id="useFirefoxSync" data-l10n-id="use-firefox-sync"/>
       <deck id="getStarted">
         <label class="text-link" data-l10n-id="get-started-not-logged-in"/>
         <label class="text-link" data-l10n-id="get-started-configured"/>
       </deck>
     </hbox>
   </vbox>
 #endif