| Index: lib/subscriptionInit.js |
| =================================================================== |
| --- a/lib/subscriptionInit.js |
| +++ b/lib/subscriptionInit.js |
| @@ -23,10 +23,12 @@ |
| SpecialSubscription} = require("subscriptionClasses"); |
| const {FilterStorage} = require("filterStorage"); |
| const {FilterNotifier} = require("filterNotifier"); |
| +const info = require("info"); |
| const {Prefs} = require("prefs"); |
| const {Synchronizer} = require("synchronizer"); |
| const {Utils} = require("utils"); |
| const {initNotifications} = require("notificationHelper"); |
| +const {updatesVersion} = require("ui"); |
| let firstRun; |
| let subscriptionsCallback = null; |
| @@ -48,7 +50,7 @@ |
| if (firstRun && (!FilterStorage.firstRun || Prefs.currentVersion)) |
| exports.reinitialized = true; |
| - Prefs.currentVersion = require("info").addonVersion; |
| + Prefs.currentVersion = info.addonVersion; |
| } |
| /** |
| @@ -204,8 +206,31 @@ |
| Synchronizer.execute(subscription); |
| } |
| - if (firstRun && !Prefs.suppress_first_run_page) |
| - browser.tabs.create({url: browser.extension.getURL("firstRun.html")}); |
| + if (!Prefs.suppress_first_run_page) |
| + { |
| + let page = null; |
| + if (firstRun) |
| + { |
| + page = "firstRun.html"; |
| + } |
| + // For now we're limiting the updates page to users of |
| + // Chromium-based browsers to gage its impact |
| + else if (info.platform == "chromium" && |
| + updatesVersion > Prefs.updates_version) |
| + { |
| + page = "updates.html"; |
| + } |
| + |
| + if (page) |
| + { |
| + browser.tabs.create({url: browser.extension.getURL(page)}); |
| + |
| + // Users should now be aware of the latest updates so we need to reflect |
| + // that in the preference to ensure they're not shown the updates page |
| + // multiple times |
| + Prefs.updates_version = updatesVersion; |
| + } |
| + } |
| initNotifications(); |
| } |