Index: lib/init.js |
=================================================================== |
--- a/lib/init.js |
+++ b/lib/init.js |
@@ -13,34 +13,35 @@ |
* |
* You should have received a copy of the GNU General Public License |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
let {Prefs} = require("prefs"); |
let {FilterNotifier} = require("filterNotifier"); |
-let prefsInitDone = false; |
let filtersInitDone = false; |
function checkInitialized() |
{ |
- if (prefsInitDone && filtersInitDone) |
+ if (Prefs.initialized && filtersInitDone) |
{ |
checkInitialized = function() {}; |
_triggerEvent("_init", require("filterStorage").FilterStorage.firstRun); |
} |
} |
Prefs._initListener = function() |
{ |
- prefsInitDone = true; |
checkInitialized(); |
}; |
+if (Prefs.initialized) |
sergei
2017/06/16 15:05:54
Could you please move all these changes in JS file
hub
2017/06/16 21:52:54
Done.
https://codereview.adblockplus.org/29467599
|
+ checkInitialized(); |
+ |
FilterNotifier.addListener(function(action) |
{ |
if (action === "load") |
{ |
let {FilterStorage} = require("filterStorage"); |
if (FilterStorage.firstRun) |
{ |
// No data, must be a new user or someone with corrupted data - initialize |