Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/subscriptionInit.js

Issue 29664623: Issue 6403 - Updated adblockplusui dependency (Closed)
Patch Set: Moved updatesVersion to adblockplusui Created Jan. 22, 2018, 4:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« lib/prefs.js ('K') | « lib/prefs.js ('k') | metadata.chrome » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,27 @@
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)
kzar 2018/01/23 10:07:13 Nit: This indentation is quite unusual, mind putti
Thomas Greiner 2018/01/25 11:09:45 Done. I don't mind making such adjustments but it
kzar 2018/01/25 11:46:25 Yes, it would be great if ESLint could capture all
Thomas Greiner 2018/01/25 13:09:04 Just to clarify: I'm not talking about linting rul
+ {
+ page = "updates.html";
+ }
+
+ if (page)
+ {
+ browser.tabs.create({url: browser.extension.getURL(page)});
+ Prefs.updates_version = updatesVersion;
kzar 2018/01/23 10:07:13 Mind adding a short comment here explaining that w
Thomas Greiner 2018/01/25 11:09:45 Done.
kzar 2018/01/25 11:46:25 Thanks but the main thing I wanted to mention was
Thomas Greiner 2018/01/25 13:09:03 Done. My bad. Note that I replaced "the next time
+ }
+ }
initNotifications();
}
« lib/prefs.js ('K') | « lib/prefs.js ('k') | metadata.chrome » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld