зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1639980 - Hide Pocket saved pages if Pocket is disabled. r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D79750
This commit is contained in:
Родитель
cce0439cc1
Коммит
7571dc2667
|
@ -245,6 +245,7 @@ this.AboutPreferences = class AboutPreferences {
|
|||
linkPref(subcheck, nested.name, "bool");
|
||||
subChecks.push(subcheck);
|
||||
subcheck.disabled = !pref._value;
|
||||
subcheck.hidden = nested.hidden;
|
||||
});
|
||||
|
||||
// Disable any nested checkboxes if the parent pref is not enabled.
|
||||
|
|
|
@ -111,6 +111,10 @@ const BUILT_IN_SECTIONS = {
|
|||
{
|
||||
name: "section.highlights.includePocket",
|
||||
titleString: "home-prefs-highlights-option-saved-to-pocket",
|
||||
hidden: !Services.prefs.getBoolPref(
|
||||
"extensions.pocket.enabled",
|
||||
true
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -305,6 +305,13 @@ describe("AboutPreferences Feed", () => {
|
|||
|
||||
assert.calledWith(node.setAttribute, "data-l10n-id", titleString);
|
||||
});
|
||||
it("should set node hidden to true", () => {
|
||||
prefStructure[0].pref.nestedPrefs[0].hidden = true;
|
||||
|
||||
testRender();
|
||||
|
||||
assert.isTrue(node.hidden);
|
||||
});
|
||||
it("should add a change event", () => {
|
||||
testRender();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче