On reconnect do not redirect to 'receive' tab

This commit is contained in:
Ivan Socolsky 2014-09-19 11:27:48 -03:00
parent cf4f663fb0
commit dadf8396f5
1 changed files with 8 additions and 4 deletions

View File

@ -55,11 +55,14 @@ angular.module('copayApp.services')
}); });
w.on('ready', function(myPeerID) { w.on('ready', function(myPeerID) {
$rootScope.wallet = w; $rootScope.wallet = w;
if ($rootScope.initialConnection) {
$rootScope.initialConnection = false;
if ($rootScope.pendingPayment) { if ($rootScope.pendingPayment) {
$location.path('send'); $location.path('send');
} else { } else {
$location.path('receive'); $location.path('receive');
} }
}
}); });
w.on('publicKeyRingUpdated', function(dontDigest) { w.on('publicKeyRingUpdated', function(dontDigest) {
@ -137,6 +140,7 @@ angular.module('copayApp.services')
uriHandler.register(); uriHandler.register();
$rootScope.unitName = config.unitName; $rootScope.unitName = config.unitName;
$rootScope.txAlertCount = 0; $rootScope.txAlertCount = 0;
$rootScope.initialConnection = true;
$rootScope.reconnecting = false; $rootScope.reconnecting = false;
$rootScope.isCollapsed = true; $rootScope.isCollapsed = true;
$rootScope.$watch('txAlertCount', function(txAlertCount) { $rootScope.$watch('txAlertCount', function(txAlertCount) {