Skip to content
Snippets Groups Projects
Commit 91f45b82 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Notifications: store the last read time in the right property

parent 5bca99ff
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
};
......
......@@ -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({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment