From c8a6daa7bcfabef0e75fc67566575abc939f4c83 Mon Sep 17 00:00:00 2001 From: nobody Date: Sun, 25 Oct 2020 00:09:42 +0200 Subject: [PATCH] Fixed: Statistics cannot be deleted (#152) --- core/messenger.js | 4 ++++ pages/statistics/statistics.js | 1 + pages/updates/updates.html | 1 + 3 files changed, 6 insertions(+) diff --git a/core/messenger.js b/core/messenger.js index 272c7f99..be273502 100644 --- a/core/messenger.js +++ b/core/messenger.js @@ -92,6 +92,10 @@ messenger._handleMessageReceived = function (message, sender, sendResponse) { return MessageResponse.ASYNCHRONOUS; } + + if (topic === 'deleteStatistic') { + storageManager.statistics = {}; + } }; /** diff --git a/pages/statistics/statistics.js b/pages/statistics/statistics.js index d87e45a0..9c1093f0 100644 --- a/pages/statistics/statistics.js +++ b/pages/statistics/statistics.js @@ -223,6 +223,7 @@ statistics._deleteStatistic = function () { chrome.storage.local.set({ [Setting.INTERNAL_STATISTICS_DATA]: {} }); + chrome.runtime.sendMessage({ topic: 'deleteStatistic' }); } }; diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 7367e9d7..3687f9b1 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -38,6 +38,7 @@
  • Added: OwlCarousel v2.0.0-beta.2.4 (#148)
  • Added: markdown-it v12.0.2 (#149)
  • Fixed: Unknown frameworks in statistics page (#151)
  • +
  • Fixed: Statistics cannot be deleted (#152)