Bug 1954648 - Smart Tab Group settings in Preferences->Tabs r=ngrato,fluent-reviewers,settings-reviewers,tabbrowser-reviewers,dwalker,flod
Differential Revision: https://phabricator.services.mozilla.com/D241922
This commit is contained in:
@@ -331,7 +331,7 @@
|
||||
super();
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"smartTabGroupsEnabled",
|
||||
"smartTabGroupsFeatureConfigEnabled",
|
||||
"browser.tabs.groups.smart.enabled",
|
||||
false,
|
||||
this.#onSmartTabGroupsPrefChange.bind(this)
|
||||
@@ -450,8 +450,17 @@
|
||||
this.#swatchesContainer.addEventListener("change", this);
|
||||
}
|
||||
|
||||
#onSmartTabGroupsPrefChange(_preName, _prev, latest) {
|
||||
const icon = latest ? MozTabbrowserTabGroupMenu.AI_ICON : "";
|
||||
get smartTabGroupsEnabled() {
|
||||
return (
|
||||
this.smartTabGroupsUserEnabled &&
|
||||
this.smartTabGroupsFeatureConfigEnabled
|
||||
);
|
||||
}
|
||||
|
||||
#onSmartTabGroupsPrefChange(_preName, _prev, _latest) {
|
||||
const icon = this.smartTabGroupsEnabled
|
||||
? MozTabbrowserTabGroupMenu.AI_ICON
|
||||
: "";
|
||||
|
||||
this.#suggestionButton.iconSrc = icon;
|
||||
this.#suggestionsMessage.iconSrc = icon;
|
||||
|
||||
Reference in New Issue
Block a user