disable grouping in activity
This commit is contained in:
parent
333b4f45a0
commit
e0b77968bd
3 changed files with 61 additions and 60 deletions
|
|
@ -1,14 +1,14 @@
|
|||
<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
|
||||
</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
|
||||
</div>
|
||||
|
||||
<div ng-if="x.types.indexOf('NewOutgoingTx')>=0">
|
||||
<div ng-if="x.type == 'NewOutgoingTx'">
|
||||
<span translate>Payment Sent </span>
|
||||
<div class="wallet-activity-amount">
|
||||
{{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>
|
||||
<div class="wallet-activity-amount">
|
||||
{{x.amountStr}}
|
||||
</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>
|
||||
<span translate>Proposal Deleted</span>
|
||||
</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>
|
||||
<span translate>Proposal Rejected</span>
|
||||
</div>
|
||||
|
||||
<div ng-if="x.types.indexOf('TxProposalRemoved') == -1 && x.types.indexOf('TxProposalRejected') == -1">
|
||||
<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>
|
||||
<span ng-if="x.type == 'NewTxProposal'">
|
||||
<i class="icon ion-arrow-up-c size-21" ng-style="{'color':x.wallet.color}"></i>
|
||||
|
||||
{{x.amountStr}}
|
||||
<i>{{x.message}}</i>
|
||||
</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>
|
||||
{{x.amountStr}}
|
||||
<i>{{x.message}}</i>
|
||||
</span>
|
||||
|
||||
<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">
|
||||
<!-- {{x.types}} -->
|
||||
|
|
|
|||
|
|
@ -31,19 +31,19 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
wallet.status = status;
|
||||
});
|
||||
});
|
||||
//
|
||||
// $scope.fetchingNotifications = true;
|
||||
// profileService.getNotifications({
|
||||
// limit: 3
|
||||
// }, function(err, n) {
|
||||
// if (err) {
|
||||
// console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
|
||||
// return;
|
||||
// }
|
||||
// $scope.fetchingNotifications = false;
|
||||
// setNotifications(n);
|
||||
// $ionicScrollDelegate.resize();
|
||||
// })
|
||||
|
||||
$scope.fetchingNotifications = true;
|
||||
profileService.getNotifications({
|
||||
limit: 3
|
||||
}, function(err, n) {
|
||||
if (err) {
|
||||
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
|
||||
return;
|
||||
}
|
||||
$scope.fetchingNotifications = false;
|
||||
setNotifications(n);
|
||||
$ionicScrollDelegate.resize();
|
||||
})
|
||||
};
|
||||
|
||||
$scope.updateWallet = function(wallet) {
|
||||
|
|
@ -55,17 +55,17 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
}
|
||||
wallet.status = status;
|
||||
|
||||
// profileService.getNotifications({
|
||||
// limit: 3
|
||||
// }, function(err, n) {
|
||||
// console.log('[tab-home.js.57]', n); //TODO
|
||||
// if (err) {
|
||||
// console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
|
||||
// return;
|
||||
// }
|
||||
// setNotifications(n);
|
||||
// $ionicScrollDelegate.resize();
|
||||
// })
|
||||
profileService.getNotifications({
|
||||
limit: 3
|
||||
}, function(err, n) {
|
||||
console.log('[tab-home.js.57]', n); //TODO
|
||||
if (err) {
|
||||
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
|
||||
return;
|
||||
}
|
||||
setNotifications(n);
|
||||
$ionicScrollDelegate.resize();
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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) ????
|
||||
lodash.each(shown, function(x) {
|
||||
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);
|
||||
prev.txid = prev.txid || x.txid;
|
||||
prev.amountStr = prev.amountStr || x.amountStr;
|
||||
prev.creatorName = prev.creatorName || x.creatorName;
|
||||
} else {
|
||||
finale.push(x);
|
||||
prev = x;
|
||||
}
|
||||
});
|
||||
|
||||
// messages...
|
||||
// var finale = [],
|
||||
// prev;
|
||||
//
|
||||
//
|
||||
// // Item grouping... DISABLED.
|
||||
//
|
||||
// // REMOVE (if we want 1-to-1 notification) ????
|
||||
// lodash.each(shown, function(x) {
|
||||
// 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);
|
||||
// prev.txid = prev.txid || x.txid;
|
||||
// prev.amountStr = prev.amountStr || x.amountStr;
|
||||
// prev.creatorName = prev.creatorName || x.creatorName;
|
||||
// } else {
|
||||
// finale.push(x);
|
||||
// prev = x;
|
||||
// }
|
||||
// });
|
||||
//
|
||||
|
||||
var u = bwcService.getUtils();
|
||||
lodash.each(finale, function(x) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue