fix url handling on cold start

This commit is contained in:
Matias Alejo Garcia 2016-06-11 23:08:30 -03:00
commit 27e925b84f
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
3 changed files with 12 additions and 9 deletions

View file

@ -518,7 +518,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
} }
}); });
}) })
.run(function($rootScope, $state, $location, $log, $timeout, $ionicPlatform, platformInfo, profileService, uxLanguage, animationService, go, gettextCatalog) { .run(function($rootScope, $state, $location, $log, $timeout, $ionicPlatform, platformInfo, profileService, uxLanguage, go, gettextCatalog) {
$ionicPlatform.ready(function() { $ionicPlatform.ready(function() {
if (platformInfo.isCordova) { if (platformInfo.isCordova) {

View file

@ -25,8 +25,11 @@ angular.module('copayApp.services').factory('openURLService', function($rootScop
$log.warn('Profile not bound yet. Waiting'); $log.warn('Profile not bound yet. Waiting');
return $rootScope.$on('Local/ProfileBound', function() { return $rootScope.$on('Local/ProfileBound', function() {
// Wait ux to settle
setTimeout(function() {
$log.warn('Profile ready, retrying...'); $log.warn('Profile ready, retrying...');
handleOpenURL(args); handleOpenURL(args);
}, 2000);
}); });
}; };

View file

@ -171,7 +171,7 @@ angular.module('copayApp.services')
} }
root.isBound = true; root.isBound = true;
$root.$emit('Local/ProfileBound'); $rootScope.$emit('Local/ProfileBound');
return cb(); return cb();
}); });
}); });