Merge pull request #3183 from cmgustavo/bug/splash-01

Mobile: fixes splash and missing $timeout in confirmDialogs service
This commit is contained in:
Matias Alejo Garcia 2015-09-16 15:27:36 -03:00
commit accc44110f
3 changed files with 51 additions and 44 deletions

View file

@ -1,4 +1,7 @@
<div class="splash content text-center" ng-if="!index.hasProfile" ng-controller="splashController">
<div class="splash content text-center"
ng-init="init()"
ng-controller="splashController">
<div ng-if="!index.hasProfile">
<div class="row">
<div class="medium-centered small-centered large-centered columns">
<div class="m20t">
@ -37,3 +40,4 @@
</div>
</div>
</div>
</div>

View file

@ -1,14 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('splashController',
function($scope, $timeout, $log, profileService, storageService, go, bwcService) {
storageService.getCopayDisclaimerFlag(function(err, val) {
if (!val) go.path('disclaimer');
if (profileService.profile) {
go.walletHome();
}
});
function($scope, $timeout, $log, profileService, storageService, go) {
$scope.create = function(noWallet) {
$scope.creatingProfile = true;
@ -29,4 +22,14 @@ angular.module('copayApp.controllers').controller('splashController',
});
}, 100);
};
$scope.init = function() {
storageService.getCopayDisclaimerFlag(function(err, val) {
if (!val) go.path('disclaimer');
if (profileService.profile) {
go.walletHome();
}
});
};
});

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.services').factory('confirmDialog', function($log, profileService, configService, gettextCatalog, isCordova, isChromeApp) {
angular.module('copayApp.services').factory('confirmDialog', function($log, $timeout, profileService, configService, gettextCatalog, isCordova, isChromeApp) {
var root = {};