fix signingOut flag

This commit is contained in:
Matias Alejo Garcia 2015-01-07 23:59:53 -03:00
commit 396fbda5d9

View file

@ -61,7 +61,7 @@ angular.module('copayApp.services')
}); });
}; };
root.resendVerificationEmail = function (cb) { root.resendVerificationEmail = function(cb) {
var iden = $rootScope.iden; var iden = $rootScope.iden;
iden.resendVerificationEmail(cb); iden.resendVerificationEmail(cb);
}; };
@ -71,7 +71,7 @@ angular.module('copayApp.services')
return; return;
var customHeaders = {}; var customHeaders = {};
_.each(_.keys(headers), function (headerKey) { _.each(_.keys(headers), function(headerKey) {
var hk = headerKey.toLowerCase(); var hk = headerKey.toLowerCase();
if (hk.indexOf('x-') === 0) { if (hk.indexOf('x-') === 0) {
customHeaders[hk] = headers[headerKey]; customHeaders[hk] = headers[headerKey];
@ -320,10 +320,11 @@ angular.module('copayApp.services')
}; };
root.signout = function() { root.signout = function() {
$rootScope.signingOut = true;
if ($rootScope.iden) { if ($rootScope.iden) {
$rootScope.signingOut = false; $rootScope.signingOut = true;
$rootScope.iden.close(); // Will trigger 'closed' $rootScope.iden.close(function() { // Will trigger 'closed'
$rootScope.signingOut = false;
}); // Will trigger 'closed'
} }
}; };