Fix reloading after restart app

This commit is contained in:
Gustavo Maximiliano Cortez 2015-06-11 12:53:38 -03:00
commit 9cebdbef42
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 11 additions and 9 deletions

View file

@ -108,14 +108,19 @@ angular
views: {
'main': {
templateUrl: 'views/disclaimer.html',
controller: function($scope, storageService, applicationService) {
controller: function($scope, $timeout, storageService, applicationService, go) {
storageService.getCopayDisclaimer(function(err, val) {
$scope.agreed = val;
$timeout(function(){
$scope.$digest();
}, 1);
});
$scope.agree = function() {
storageService.setCopayDisclaimer(function(err) {
applicationService.restart();
$timeout(function(){
applicationService.restart();
}, 1000);
});
};
}