| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 let {Prefs} = require("prefs"); | 18 let {Prefs} = require("prefs"); |
| 19 let {FilterNotifier} = require("filterNotifier"); | 19 let {FilterNotifier} = require("filterNotifier"); |
| 20 | 20 |
| 21 let prefsInitDone = false; | 21 let prefsInitDone = false; |
| 22 let filtersInitDone = false; | 22 let filtersInitDone = false; |
| 23 | 23 |
| 24 function checkInitialized() | 24 function checkInitialized() |
| 25 { | 25 { |
| 26 if (prefsInitDone && filtersInitDone) | 26 if (prefsInitDone && filtersInitDone) |
| 27 { | 27 { |
| 28 checkInitialized = function() {}; | 28 checkInitialized = function() {}; |
| 29 _triggerEvent("init", require("filterStorage").FilterStorage.firstRun); | 29 _triggerEvent("init", (!!firstRunDisabled ? false : require("filterStorage") .FilterStorage.firstRun)); |
|
Eric
2015/05/15 19:36:13
I don't think this works correctly, or if it does,
Felix Dahlke
2015/05/28 20:42:56
Yes, I'm afraid we'll have to respect the suppress
| |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 | 32 |
| 33 Prefs._initListener = function() | 33 Prefs._initListener = function() |
| 34 { | 34 { |
| 35 prefsInitDone = true; | 35 prefsInitDone = true; |
| 36 checkInitialized(); | 36 checkInitialized(); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 FilterNotifier.addListener(function(action) | 39 FilterNotifier.addListener(function(action) |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 63 subscription.homepage = node.homepage; | 63 subscription.homepage = node.homepage; |
| 64 if (subscription instanceof DownloadableSubscription && !subscription.la stDownload) | 64 if (subscription instanceof DownloadableSubscription && !subscription.la stDownload) |
| 65 Synchronizer.execute(subscription); | 65 Synchronizer.execute(subscription); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 filtersInitDone = true; | 69 filtersInitDone = true; |
| 70 checkInitialized(); | 70 checkInitialized(); |
| 71 } | 71 } |
| 72 }); | 72 }); |
| OLD | NEW |