disable grouping in activity

This commit is contained in:
Matias Alejo Garcia 2016-09-01 16:50:13 -03:00
commit e0b77968bd
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
3 changed files with 61 additions and 60 deletions

View file

@ -1,14 +1,14 @@
<span class="wallet-activity"> <span class="wallet-activity">
<div ng-if="x.types.indexOf('NewCopayer')>=0 && x.wallet.n>1"> <div ng-if="x.type == 'NewCopayer' && x.wallet.n>1">
Copayer joined Copayer joined
</div> </div>
<div ng-if="x.types.indexOf('NewCopayer')>=0 && x.wallet.n==1"> <div ng-if="x.type == 'NewCopayer' && x.wallet.n==1">
Wallet created Wallet created
</div> </div>
<div ng-if="x.types.indexOf('NewOutgoingTx')>=0"> <div ng-if="x.type == 'NewOutgoingTx'">
<span translate>Payment Sent </span> <span translate>Payment Sent </span>
<div class="wallet-activity-amount"> <div class="wallet-activity-amount">
{{x.amountStr}} {{x.amountStr}}
@ -17,36 +17,34 @@
<div ng-if="x.types.indexOf('NewIncomingTx')>=0"> <div ng-if="x.type == 'NewIncomingTx'">
<span translate>Payment Received</span> <span translate>Payment Received</span>
<div class="wallet-activity-amount"> <div class="wallet-activity-amount">
{{x.amountStr}} {{x.amountStr}}
</div> </div>
</div> </div>
<div ng-if="x.types.indexOf('TxProposalRemoved')>=0"> <div ng-if="x.type == 'TxProposalRemoved'">
<i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i> <i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Deleted</span> <span translate>Proposal Deleted</span>
</div> </div>
<div ng-if="x.types.indexOf('TxProposalRejected')>=0"> <div ng-if="x.type == 'TxProposalRejected'">
<i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i> <i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Rejected</span> <span translate>Proposal Rejected</span>
</div> </div>
<div ng-if="x.types.indexOf('TxProposalRemoved') == -1 && x.types.indexOf('TxProposalRejected') == -1"> <span ng-if="x.type == 'NewTxProposal'">
<span ng-if="x.types.indexOf('NewTxProposal')>=0 && x.types.indexOf('NewOutgoingTx')==-1 "> <i class="icon ion-arrow-up-c size-21" ng-style="{'color':x.wallet.color}"></i>
<i class="icon ion-arrow-up-c size-21" ng-style="{'color':x.wallet.color}"></i>
{{x.amountStr}} {{x.amountStr}}
<i>{{x.message}}</i> <i>{{x.message}}</i>
</span> </span>
<span ng-if="x.types.indexOf('TxProposalAcceptedBy')>=0 && x.types.indexOf('NewTxProposal') == -1 && x.types.indexOf('NewOutgoingTx')==-1">
<i class="icon ion-checkmark-round size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Accepted</span>
</span>
</div>
<span ng-if="x.type == 'TxProposalAcceptedBy'">
<i class="icon ion-checkmark-round size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Accepted</span>
</span>
<p class="wallet-activity-note"> <p class="wallet-activity-note">
<!-- {{x.types}} --> <!-- {{x.types}} -->

View file

@ -31,19 +31,19 @@ angular.module('copayApp.controllers').controller('tabHomeController',
wallet.status = status; wallet.status = status;
}); });
}); });
//
// $scope.fetchingNotifications = true; $scope.fetchingNotifications = true;
// profileService.getNotifications({ profileService.getNotifications({
// limit: 3 limit: 3
// }, function(err, n) { }, function(err, n) {
// if (err) { if (err) {
// console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
// return; return;
// } }
// $scope.fetchingNotifications = false; $scope.fetchingNotifications = false;
// setNotifications(n); setNotifications(n);
// $ionicScrollDelegate.resize(); $ionicScrollDelegate.resize();
// }) })
}; };
$scope.updateWallet = function(wallet) { $scope.updateWallet = function(wallet) {
@ -55,17 +55,17 @@ angular.module('copayApp.controllers').controller('tabHomeController',
} }
wallet.status = status; wallet.status = status;
// profileService.getNotifications({ profileService.getNotifications({
// limit: 3 limit: 3
// }, function(err, n) { }, function(err, n) {
// console.log('[tab-home.js.57]', n); //TODO console.log('[tab-home.js.57]', n); //TODO
// if (err) { if (err) {
// console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
// return; return;
// } }
// setNotifications(n); setNotifications(n);
// $ionicScrollDelegate.resize(); $ionicScrollDelegate.resize();
// }) })
}); });
}; };

View file

@ -822,26 +822,29 @@ angular.module('copayApp.services')
}; };
}); });
// condense
var finale = [],
prev;
var finale = shown; // GROUPING DISABLED!
// REMOVE (if we want 1-to-1 notification) ???? // var finale = [],
lodash.each(shown, function(x) { // prev;
if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) { //
prev.types.push(x.type); //
prev.data = lodash.assign(prev.data, x.data); // // Item grouping... DISABLED.
prev.txid = prev.txid || x.txid; //
prev.amountStr = prev.amountStr || x.amountStr; // // REMOVE (if we want 1-to-1 notification) ????
prev.creatorName = prev.creatorName || x.creatorName; // lodash.each(shown, function(x) {
} else { // if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) {
finale.push(x); // prev.types.push(x.type);
prev = x; // prev.data = lodash.assign(prev.data, x.data);
} // prev.txid = prev.txid || x.txid;
}); // prev.amountStr = prev.amountStr || x.amountStr;
// prev.creatorName = prev.creatorName || x.creatorName;
// messages... // } else {
// finale.push(x);
// prev = x;
// }
// });
//
var u = bwcService.getUtils(); var u = bwcService.getUtils();
lodash.each(finale, function(x) { lodash.each(finale, function(x) {