diff --git a/core/state-manager.js b/core/state-manager.js index 574a23e1..14139ae3 100644 --- a/core/state-manager.js +++ b/core/state-manager.js @@ -221,6 +221,9 @@ stateManager._handleStorageChanged = function (changes) { if (Setting.INTERNAL_STATISTICS in changes) { stateManager.internalStatistics = changes.internalStatistics.newValue; } + if (Setting.INTERNAL_STATISTICS_DATA in changes) { + stats.data = changes.internalStatisticsData.newValue; + } }; stateManager._clearBadgeText = function (tabIdentifier) { diff --git a/pages/statistics/statistics.js b/pages/statistics/statistics.js index 33f7dfac..f1dfb84e 100644 --- a/pages/statistics/statistics.js +++ b/pages/statistics/statistics.js @@ -208,10 +208,10 @@ statistics._handlerDateRange = function ({ target }) { let type = target.value; if (type === 'day' || type === 'week' || type === 'month' || type === 'year') { statistics._dateUnit = type; - statistics._getStatistics().then(statistics._setDateRange); } else if (type === 'delete') { statistics._deleteStatistic(); } + statistics._getStatistics().then(statistics._setDateRange); }; statistics._deleteStatistic = function () {