Fixed: Reload content after data was deleted (#74)

This commit is contained in:
nobody 2020-08-12 07:23:33 +02:00
parent 2528390e7b
commit ce67b1426e
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
2 changed files with 4 additions and 1 deletions

View File

@ -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) {

View File

@ -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 () {