зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1384541 - Add a UI migration from compact themes to compact mode. r=dao
MozReview-Commit-ID: A6kr1QM5Nxu --HG-- extra : rebase_source : c7065dc43723a3e086238ebaaa5b2413f75f9b53
This commit is contained in:
Родитель
fd46c8db90
Коммит
f2d83992cd
|
@ -1735,7 +1735,7 @@ BrowserGlue.prototype = {
|
||||||
|
|
||||||
// eslint-disable-next-line complexity
|
// eslint-disable-next-line complexity
|
||||||
_migrateUI: function BG__migrateUI() {
|
_migrateUI: function BG__migrateUI() {
|
||||||
const UI_VERSION = 50;
|
const UI_VERSION = 51;
|
||||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
|
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
|
||||||
|
|
||||||
let currentUIVersion;
|
let currentUIVersion;
|
||||||
|
@ -2095,6 +2095,16 @@ BrowserGlue.prototype = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (currentUIVersion < 51) {
|
||||||
|
// Switch to compact UI density if the user is using a formerly compact
|
||||||
|
// dark or light theme.
|
||||||
|
let currentTheme = Services.prefs.getCharPref("lightweightThemes.selectedThemeID", "");
|
||||||
|
if (currentTheme == "firefox-compact-dark@mozilla.org" ||
|
||||||
|
currentTheme == "firefox-compact-light@mozilla.org") {
|
||||||
|
Services.prefs.setIntPref("browser.uidensity", 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Update the migration version.
|
// Update the migration version.
|
||||||
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
||||||
},
|
},
|
||||||
|
|
Загрузка…
Ссылка в новой задаче