зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1508777 Skip updates for LWTs with no updateURL r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D14931 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ac74e72736
Коммит
1520f7332f
|
@ -279,6 +279,10 @@ var LightweightThemeManager = {
|
||||||
* xpi packaged theme).
|
* xpi packaged theme).
|
||||||
*/
|
*/
|
||||||
async _updateOneTheme(theme, isCurrent) {
|
async _updateOneTheme(theme, isCurrent) {
|
||||||
|
if (!theme.updateURL) {
|
||||||
|
return theme;
|
||||||
|
}
|
||||||
|
|
||||||
let req = new ServiceRequest();
|
let req = new ServiceRequest();
|
||||||
|
|
||||||
req.mozBackgroundRequest = true;
|
req.mozBackgroundRequest = true;
|
||||||
|
@ -364,7 +368,7 @@ var LightweightThemeManager = {
|
||||||
|
|
||||||
let selectedID = _prefs.getStringPref("selectedThemeID", DEFAULT_THEME_ID);
|
let selectedID = _prefs.getStringPref("selectedThemeID", DEFAULT_THEME_ID);
|
||||||
let newThemes = await Promise.all(allThemes.map(
|
let newThemes = await Promise.all(allThemes.map(
|
||||||
t => this._updateOneTheme(t, t.id == selectedID)));
|
t => this._updateOneTheme(t, t.id == selectedID).catch(err => {})));
|
||||||
newThemes = newThemes.filter(t => t);
|
newThemes = newThemes.filter(t => t);
|
||||||
_prefs.setStringPref("usedThemes", JSON.stringify(newThemes));
|
_prefs.setStringPref("usedThemes", JSON.stringify(newThemes));
|
||||||
},
|
},
|
||||||
|
|
Загрузка…
Ссылка в новой задаче