From a2cb524edd5517de0d2cc5ab97c798adf4350747 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sat, 8 Jun 2024 09:33:41 +0800 Subject: [PATCH] Fix reading global data for duration --- src/scripts/background/check.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/background/check.js b/src/scripts/background/check.js index 8a90503..1a6b90c 100644 --- a/src/scripts/background/check.js +++ b/src/scripts/background/check.js @@ -54,8 +54,8 @@ export default class BackgroundCheck { const updater_run = async () => { filter.update(); - // Update the last time. - return(await global.write([`settings`,`sync`,`last`], Date.now(), -1)); + // Update the last update time. + return(await global.write([`settings`,`sync`,`last`], Date.now(), -1, {"verify": false})); }; // Set the interval. @@ -87,7 +87,7 @@ export default class BackgroundCheck { if ((await global.read([`settings`, `sync`, `duration`])) ? (await global.read([`settings`, `sync`, `duration`] * (60 ** 2) * 1000 != DURATION_PREFERENCES[`duration`])) : false) { if (await global.global.read([`settings`, `sync`, `duration`])) { // Get the new time. - DURATION_PREFERENCES[`duration`] = await global.global.read([`settings`, `sync`, `duration`]) * (60 ** 2) * 1000; + DURATION_PREFERENCES[`duration`] = await global.read([`settings`, `sync`, `duration`]) * (60 ** 2) * 1000; // Reset the updater. updater_reset();