From 8aeb670be1d252807252ee2bfe99b15b81c3e28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 6 Apr 2022 10:38:06 +0800 Subject: update from upstream --- js/storage.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'js/storage.js') 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 -- cgit v1.2.3