Fixes: suggestions by @matiu

This commit is contained in:
Gustavo Cortez 2014-05-15 10:41:42 -03:00
parent 82abcb8036
commit 89b2788e39
2 changed files with 5 additions and 5 deletions

View File

@ -28,11 +28,11 @@ angular.module('copay.header').controller('HeaderController',
});
// Initialize alert notification (not show when init wallet)
$rootScope.showTxAlert = 0;
$rootScope.txAlertCount = 0;
$notification.enableHtml5Mode(); // for chrome: if support, enable it
$rootScope.$watch('showTxAlert', function(showTxAlert) {
if (showTxAlert && showTxAlert > 0) {
$notification.info('New Transaction', ($rootScope.showTxAlert == 1) ? 'You have pending a transaction proposal' : 'You have pending ' + $rootScope.showTxAlert + ' transaction proposals', showTxAlert);
$rootScope.$watch('txAlertCount', function(txAlertCount) {
if (txAlertCount && txAlertCount > 0) {
$notification.info('New Transaction', ($rootScope.txAlertCount == 1) ? 'You have a pending transaction proposal' : 'You have ' + $rootScope.txAlertCount + ' pending transaction proposals', txAlertCount);
}
});

View File

@ -160,7 +160,7 @@ angular.module('copay.controllerUtils')
$rootScope.txs = txs;
if ($rootScope.pendingTxCount < pending) {
$rootScope.showTxAlert = pending;
$rootScope.txAlertCount = pending;
}
$rootScope.pendingTxCount = pending;
w.removeListener('txProposalsUpdated',root.updateTxs)