diff --git a/www/plugins/es/js/controllers/notification-controllers.js b/www/plugins/es/js/controllers/notification-controllers.js index 424b3b9904402cffbbd08249d16399b02cfa6fa0..937b70d972a797cd6289c36e2bb32b41f3863edd 100644 --- a/www/plugins/es/js/controllers/notification-controllers.js +++ b/www/plugins/es/js/controllers/notification-controllers.js @@ -75,8 +75,7 @@ function NotificationsController($scope, $ionicPopover, $state, $timeout, UIUtil return $scope.showHome(); } - $scope.loadWallet({ - wallet: wallet, + wallet.login({ minData: true }) .then(function() { diff --git a/www/plugins/es/js/entities/notification.js b/www/plugins/es/js/entities/notification.js index 3350deab2852dce94d84382c46e5801802bc3527..f928c32002304b8ba750b9ab1704920109a9e380 100644 --- a/www/plugins/es/js/entities/notification.js +++ b/www/plugins/es/js/entities/notification.js @@ -43,12 +43,14 @@ function EsNotification(json, markAsReadCallback) { that.avatarIcon = 'ion-person'; that.icon = 'ion-information-circled positive'; that.state = 'app.view_wallet'; + that.medianTime = that.time; } // TX else if (json.code.startsWith('TX_')) { that.avatarIcon = 'ion-card'; that.icon = (json.code == 'TX_SENT') ? 'ion-paper-airplane dark' : 'ion-archive balanced'; + that.medianTime = that.time; pubkeys = json.params.length > 0 ? json.params[0] : null; if (pubkeys && pubkeys.indexOf(',') == -1) { that.pubkey = pubkeys; @@ -62,6 +64,7 @@ function EsNotification(json, markAsReadCallback) { that.avatarIcon = (json.code == 'CERT_RECEIVED') ? 'ion-ribbon-b' : 'ion-ribbon-a'; that.icon = (json.code == 'CERT_RECEIVED') ? 'ion-ribbon-b balanced' : 'ion-ribbon-a gray'; that.pubkey = json.params.length > 0 ? json.params[0] : null; + that.medianTime = that.time; that.state = 'app.wallet_cert'; that.stateParams = { type: (json.code == 'CERT_RECEIVED') ? 'received' : 'given' diff --git a/www/plugins/es/templates/notification/list_notification.html b/www/plugins/es/templates/notification/list_notification.html index bab9c5eac39a616e5741e54cb9505a7a1fb3000e..6b98515553b16f4ecdb458e40b31f55e0fc44217 100644 --- a/www/plugins/es/templates/notification/list_notification.html +++ b/www/plugins/es/templates/notification/list_notification.html @@ -10,10 +10,14 @@ <i ng-if="notification.avatar" class="item-image avatar" style="background-image: url({{::notification.avatar.src}})"></i> <h3 trust-as-html="notification.message | translate:(notification.messageParams||notification)"></h3> - <h4> + <h4 ng-if="!notification.medianTime"> <i class="icon {{notification.icon}}"></i> <span class="dark">{{notification.time|formatFromNow}}</span> <span class="gray">| {{notification.time|formatDate}}</span> </h4> + <h4 ng-if="notification.medianTime"> + <i class="icon {{notification.icon}}"></i> <span class="dark">{{notification.medianTime|medianFromNow}}</span> + <span class="gray">| {{notification.medianTime|medianDate}}</span> + </h4> </ion-item> </ion-list>