mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 960047 - Reset Sync promobox count for bookmark/add-on/passwords panels. r=gavin
This commit is contained in:
parent
c05e7c3894
commit
64661159ae
@ -2055,21 +2055,10 @@
|
||||
</field>
|
||||
<property name="_viewsLeftMap">
|
||||
<getter><![CDATA[
|
||||
let viewsLeftMap = {};
|
||||
try {
|
||||
viewsLeftMap = JSON.parse(Services.prefs.getCharPref("browser.syncPromoViewsLeftMap"));
|
||||
} catch (ex) {
|
||||
// If the old preference exists, migrate it to the new one.
|
||||
try {
|
||||
let oldPref = Services.prefs.getIntPref("browser.syncPromoViewsLeft");
|
||||
Services.prefs.clearUserPref("browser.syncPromoViewsLeft");
|
||||
viewsLeftMap.bookmarks = oldPref;
|
||||
viewsLeftMap.passwords = oldPref;
|
||||
Services.prefs.setCharPref("browser.syncPromoViewsLeftMap",
|
||||
JSON.stringify(viewsLeftMap));
|
||||
} catch (ex2) {}
|
||||
}
|
||||
return viewsLeftMap;
|
||||
return JSON.parse(Services.prefs.getCharPref("browser.syncPromoViewsLeftMap"));
|
||||
} catch (ex) {}
|
||||
return {};
|
||||
]]></getter>
|
||||
</property>
|
||||
<property name="_viewsLeft">
|
||||
|
@ -1292,7 +1292,7 @@ BrowserGlue.prototype = {
|
||||
},
|
||||
|
||||
_migrateUI: function BG__migrateUI() {
|
||||
const UI_VERSION = 21;
|
||||
const UI_VERSION = 22;
|
||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul#";
|
||||
let currentUIVersion = 0;
|
||||
try {
|
||||
@ -1574,6 +1574,12 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 22) {
|
||||
// Reset the Sync promobox count to promote the new FxAccount-based Sync.
|
||||
Services.prefs.clearUserPref("browser.syncPromoViewsLeft");
|
||||
Services.prefs.clearUserPref("browser.syncPromoViewsLeftMap");
|
||||
}
|
||||
|
||||
if (this._dirty)
|
||||
this._dataSource.QueryInterface(Ci.nsIRDFRemoteDataSource).Flush();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user