From 91f45b8263695b2844c184647ffdce8a7a5b0ff4 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Wed, 20 Mar 2019 11:46:23 +0100 Subject: [PATCH] [fix] Notifications: store the last read time in the right property --- www/plugins/es/js/controllers/notification-controllers.js | 6 +++--- www/plugins/es/js/services/settings-services.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/www/plugins/es/js/controllers/notification-controllers.js b/www/plugins/es/js/controllers/notification-controllers.js index 937b70d97..663632a18 100644 --- a/www/plugins/es/js/controllers/notification-controllers.js +++ b/www/plugins/es/js/controllers/notification-controllers.js @@ -159,7 +159,7 @@ function NotificationsController($scope, $ionicPopover, $state, $timeout, UIUtil .then(function() { wallet.data.notifications.unreadCount = 0; var lastNotification = $scope.search.results[0]; - wallet.data.notifications.readTime = lastNotification ? lastNotification.time : 0; + wallet.data.notifications.time = lastNotification ? lastNotification.time : 0; _.forEach($scope.search.results, function (item) { if (item.markAsRead && typeof item.markAsRead == 'function') item.markAsRead(); }); @@ -176,8 +176,8 @@ function NotificationsController($scope, $ionicPopover, $state, $timeout, UIUtil wallet.data.notifications.unreadCount = 0; var lastNotification = $scope.search.results[0]; var readTime = lastNotification.time ? lastNotification.time : 0; - if (readTime && (!wallet.data.notifications.readTime || wallet.data.notifications.readTime != readTime)) { - wallet.data.notifications.readTime = readTime; + if (readTime && (!wallet.data.notifications.time || wallet.data.notifications.time != readTime)) { + wallet.data.notifications.time = readTime; wallet.storeData(); } }; diff --git a/www/plugins/es/js/services/settings-services.js b/www/plugins/es/js/services/settings-services.js index d3ee7102e..aa2e539f5 100644 --- a/www/plugins/es/js/services/settings-services.js +++ b/www/plugins/es/js/services/settings-services.js @@ -16,8 +16,8 @@ angular.module('cesium.es.settings.services', ['cesium.services', 'cesium.es.htt var SETTINGS_SAVE_SPEC = { - includes: ['locale', 'showUDHistory', 'useRelative', 'useLocalStorage', 'expertMode', 'logoutIdle', 'blockValidityWindow'], - excludes: ['timeout', 'cacheTimeMs', 'time', 'login', 'build'], + includes: ['locale', 'showUDHistory', 'useRelative', 'useLocalStorage', 'useLocalStorageEncryption', 'expertMode', 'logoutIdle', 'blockValidityWindow'], + excludes: ['timeout', 'cacheTimeMs', 'version', 'build', 'minVersion', 'fallbackLanguage'], plugins: { es: { excludes: ['enable', 'host', 'port', 'fallbackNodes', 'enableGoogleApi', 'googleApiKey'], @@ -27,13 +27,13 @@ angular.module('cesium.es.settings.services', ['cesium.services', 'cesium.es.htt }, wallet: { includes: ['alertIfUnusedWallet'], - excludes: ['notificationReadTime'] + excludes: ['notificationReadTime'] // deprecated - should be removed later }, helptip: { excludes: ['installDocUrl'] }, notifications: { - excludes: ['readTime'] + excludes: ['time', 'warnCount', 'unreadCount'] } }, defaultSettings = angular.merge({ -- GitLab