This commit is contained in:
Matias Alejo Garcia 2016-08-31 15:16:00 -03:00
parent a4bc232f3a
commit 8bc84d397d
No known key found for this signature in database
GPG Key ID: 02470DB551277AB3
6 changed files with 21 additions and 13 deletions

View File

@ -19,7 +19,7 @@
<div ng-if="!fetchingNotifications">
<div class="list card">
<div class="item item-icon-left" ng-repeat="x in notifications" ng-click="x.action()">
<div class="item" ng-repeat="x in notifications" ng-click="x.action()">
<span ng-include="'views/includes/walletActivity.html'"></span>
</div>

View File

@ -38,5 +38,5 @@
<span class="wallet-activity-note-child">{{x.wallet.name}}</span>
<time class="wallet-activity-note-child">{{ x.createdOn * 1000 | amTimeAgo}}</time>
</p>
</span>

View File

@ -5,9 +5,10 @@
<ion-content class="padding" ng-controller="tabHomeController" ng-init="updateAllWallets(); nextStep()">
<div class="list card" ng-hide="!notifications[0]">
<div class="item item-heading">
<div class="card">
<div class="item item-divider item-icon-right">
Recent Activity
<i class="icon ion-ios-arrow-right" ui-sref="activity" ng-show="notificationsMore"></i>
</div>
<div ng-if="fetchingNotifications" class="item text-center">
<ion-spinner icon="lines"></ion-spinner>
@ -17,12 +18,9 @@
<a class="item" ng-repeat="x in notifications" ng-click="x.action()">
<span ng-include="'views/includes/walletActivity.html'"></span>
</a>
<a class="item text-center" ui-sref="activity" ng-show="notificationsMore">
<span translate>More</span> ({{notificationsMore}})
<span style="font-size:12px;color:gray">(ToDo: Cache, refresh & seft not. 1-1 no here yet)</span>
</a>
<div class="item" ng-show="!notifications[0]">
<span translate>Nothing to show here.</span>
</div>
</div>
</div>

View File

@ -35,7 +35,8 @@ angular.module('copayApp.controllers').controller('tabHomeController',
});
walletService.getNotifications(wallet, {
timeSpan: timeSpan
timeSpan: timeSpan,
includeOwn: true,
}, function(err, n) {
if (err) {
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO

View File

@ -130,7 +130,9 @@ angular.module('copayApp.services')
});
});
wallet.initialize({}, function(err) {
wallet.initialize({
notificationIncludeOwn: true,
}, function(err) {
if (err) {
$log.error('Could not init notifications err:', err);
return;

View File

@ -981,8 +981,15 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
wallet.getNotifications(opts, function(err, notifications) {
if (err) return cb(err);
var ignored = {
'NewBlock': 1,
'BalanceUpdated': 1,
'NewOutgoingTxByThirdParty': 1,
'NewAddress': 1,
};
notifications = lodash.filter(notifications, function(x) {
return x.type != 'NewBlock' && x.type != 'BalanceUpdated' && x.type != 'NewOutgoingTxByThirdParty';
return !ignored[x.type];
});
var idToName = {};