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

Unified Diff: lib/init.js

Issue 11037099: First run detection fix (Closed)
Patch Set: Cleaner version Created July 20, 2013, 8:33 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/init.js
===================================================================
--- a/lib/init.js
+++ b/lib/init.js
@@ -20,13 +20,14 @@
let prefsInitDone = false;
let filtersInitDone = false;
+let isFirstRun = false;
function checkInitialized()
{
if (prefsInitDone && filtersInitDone)
{
checkInitialized = function() {};
- _triggerEvent("init");
+ _triggerEvent("init", isFirstRun);
}
}
@@ -45,6 +46,9 @@
{
// No data, must be a new user or someone with corrupted data - initialize
// with default settings
+
+ isFirstRun = true;
+
let {Subscription, DownloadableSubscription} = require("subscriptionClasses");
let {Synchronizer} = require("synchronizer");
let {Prefs} = require("prefs");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld