Skip to main content
Sign in
Snippets Groups Projects
Verified Commit 93cb2b3f authored by henry's avatar henry Committed by Pier Angelo Vendrame
Browse files

fixup! MB 39: Add home page about:mullvad-browser

MB 411: Use the same update URL in about:mullvad-browser as the about
dialog.
parent 27402bca
No related branches found
No related tags found
1 merge request!192MB 433: Rebased onto 140.0a1
......@@ -5,22 +5,29 @@ export class AboutMullvadBrowserParent extends JSWindowActorParent {
receiveMessage(message) {
const shouldNotifyPref = "mullvadbrowser.post_update.shouldNotify";
switch (message.name) {
case "AboutMullvadBrowser:GetUpdateData":
case "AboutMullvadBrowser:GetUpdateData": {
if (!Services.prefs.getBoolPref(shouldNotifyPref, false)) {
return Promise.resolve(null);
}
Services.prefs.clearUserPref(shouldNotifyPref);
// Try use the same URL as the about dialog. See mullvad-browser#411.
let updateURL = Services.urlFormatter.formatURLPref(
"app.releaseNotesURL.aboutDialog"
);
if (updateURL === "about:blank") {
updateURL = Services.urlFormatter.formatURLPref(
"startup.homepage_override_url"
);
}
return Promise.resolve({
version: Services.prefs.getCharPref(
"browser.startup.homepage_override.mullvadbrowser.version"
),
url:
Services.prefs.getCharPref("mullvadbrowser.post_update.url", "") ||
Services.urlFormatter.formatURLPref(
"startup.homepage_override_url"
),
url: updateURL,
});
}
}
return undefined;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment