Skip to content

Commit dedb3a1

Browse files
committed
Bug 1829907 - Pocket newtab fixing locale list region issue in nightly. r=gvn
Differential Revision: https://phabricator.services.mozilla.com/D176449 UltraBlame original commit: 9d6128141763194af587c1c5a19bc320ad088a97
1 parent cfe2daf commit dedb3a1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

browser/components/newtab/lib/DiscoveryStreamFeed.jsm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,19 @@ class DiscoveryStreamFeed {
145145
if (this._isBff === undefined) {
146146
const pocketConfig =
147147
this.store.getState().Prefs.values?.pocketConfig || {};
148+
149+
const preffedLocaleListString = pocketConfig.localeListConfig || "";
150+
const preffedLocales = preffedLocaleListString
151+
.split(",")
152+
.map(s => s.trim());
153+
const localeEnabled = this.locale && preffedLocales.includes(this.locale);
154+
148155
const preffedRegionBffConfigString = pocketConfig.regionBffConfig || "";
149156
const preffedRegionBffConfig = preffedRegionBffConfigString
150157
.split(",")
151158
.map(s => s.trim());
152159
const regionBff = preffedRegionBffConfig.includes(this.region);
153-
this._isBff = regionBff;
160+
this._isBff = !localeEnabled && regionBff;
154161
}
155162

156163
return this._isBff;

0 commit comments

Comments
 (0)