aboutsummaryrefslogtreecommitdiffstats
path: root/js/storage.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/storage.js')
-rw-r--r--js/storage.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/js/storage.js b/js/storage.js
index f5afca8..24249ab 100644
--- a/js/storage.js
+++ b/js/storage.js
@@ -2,7 +2,7 @@
ηMatrix - a browser extension to black/white list requests.
Copyright (C) 2014-2019 Raymond Hill
- Copyright (C) 2019-2020 Alessio Vanni
+ Copyright (C) 2019-2022 Alessio Vanni
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -552,7 +552,7 @@ Components.utils.import('chrome://ematrix/content/lib/Tools.jsm');
};
ηMatrix.scheduleAssetUpdater = (function () {
- let timer;
+ let timer = undefined;
let next = 0;
return function (updateDelay) {
@@ -618,11 +618,11 @@ Components.utils.import('chrome://ematrix/content/lib/Tools.jsm');
if (details.assetKeys.length !== 0) {
this.loadHostsFiles();
}
- if (this.userSettings.autoUpdate) {
- this.scheduleAssetUpdater(25200000);
- } else {
- this.scheduleAssetUpdater(0);
- }
+
+ ηm.scheduleAssetUpdater(ηm.userSettings.autoUpdate ?
+ 7 * 60 * 100000 :
+ 0);
+
vAPI.messaging.broadcast({
what: 'assetsUpdated',
assetKeys: details.assetKeys