From 891723b7b95cc721eae092b53069b9e385aa6df5 Mon Sep 17 00:00:00 2001 From: tartpvule <4371378-tartpvule@users.noreply.gitlab.com> Date: Thu, 12 Sep 2019 16:44:14 +0000 Subject: [PATCH] Save on storage change and deferred save, part 2 Insert calls to deferSaveOnDisk --- core_js/tools.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core_js/tools.js b/core_js/tools.js index aa66cc2..d02aa61 100644 --- a/core_js/tools.js +++ b/core_js/tools.js @@ -199,7 +199,7 @@ function loadOldDataFromStore() } /** -* Save the hash status to the local storage. +* Save the hash status to the local storage (RAM). * The status can have the following values: * 1 "up to date" * 2 "updated" @@ -231,6 +231,7 @@ function increaseGlobalURLCounter(number) if(storage.statisticsStatus) { storage.globalurlcounter += number; + deferSaveOnDisk('globalurlcounter'); } } @@ -242,6 +243,7 @@ function increaseURLCounter() if(storage.statisticsStatus) { storage.globalCounter++; + deferSaveOnDisk('globalCounter'); } }