Bug 1445028 - Hide sync-dev-edition-root properly if sync is disabled. r?jaws
MozReview-Commit-ID: 29ylwC3tJdM
--- 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