Fixes: suggestions by @matiu
This commit is contained in:
parent
82abcb8036
commit
89b2788e39
2 changed files with 5 additions and 5 deletions
|
|
@ -28,11 +28,11 @@ angular.module('copay.header').controller('HeaderController',
|
||||||
});
|
});
|
||||||
|
|
||||||
// Initialize alert notification (not show when init wallet)
|
// Initialize alert notification (not show when init wallet)
|
||||||
$rootScope.showTxAlert = 0;
|
$rootScope.txAlertCount = 0;
|
||||||
$notification.enableHtml5Mode(); // for chrome: if support, enable it
|
$notification.enableHtml5Mode(); // for chrome: if support, enable it
|
||||||
$rootScope.$watch('showTxAlert', function(showTxAlert) {
|
$rootScope.$watch('txAlertCount', function(txAlertCount) {
|
||||||
if (showTxAlert && showTxAlert > 0) {
|
if (txAlertCount && txAlertCount > 0) {
|
||||||
$notification.info('New Transaction', ($rootScope.showTxAlert == 1) ? 'You have pending a transaction proposal' : 'You have pending ' + $rootScope.showTxAlert + ' transaction proposals', showTxAlert);
|
$notification.info('New Transaction', ($rootScope.txAlertCount == 1) ? 'You have a pending transaction proposal' : 'You have ' + $rootScope.txAlertCount + ' pending transaction proposals', txAlertCount);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ angular.module('copay.controllerUtils')
|
||||||
|
|
||||||
$rootScope.txs = txs;
|
$rootScope.txs = txs;
|
||||||
if ($rootScope.pendingTxCount < pending) {
|
if ($rootScope.pendingTxCount < pending) {
|
||||||
$rootScope.showTxAlert = pending;
|
$rootScope.txAlertCount = pending;
|
||||||
}
|
}
|
||||||
$rootScope.pendingTxCount = pending;
|
$rootScope.pendingTxCount = pending;
|
||||||
w.removeListener('txProposalsUpdated',root.updateTxs)
|
w.removeListener('txProposalsUpdated',root.updateTxs)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue