fix spinner in windows phone

This commit is contained in:
Gabriel 2017-03-30 21:37:12 +02:00
commit f677d4bd75
3 changed files with 43 additions and 38 deletions

View file

@ -211,6 +211,6 @@ angular.module('copayApp.controllers').controller('createController',
}, 100);
} else $state.go('tabs.home');
});
}, 100);
}, 300);
}
});

View file

@ -43,38 +43,40 @@ angular.module('copayApp.controllers').controller('tourController',
var retryCount = 0;
$scope.createDefaultWallet = function() {
ongoingProcess.set('creatingWallet', true);
profileService.createDefaultWallet(function(err, walletClient) {
if (err) {
$log.warn(err);
$timeout(function() {
profileService.createDefaultWallet(function(err, walletClient) {
if (err) {
$log.warn(err);
return $timeout(function() {
$log.warn('Retrying to create default wallet.....:' + ++retryCount);
if (retryCount > 3) {
ongoingProcess.set('creatingWallet', false);
popupService.showAlert(
gettextCatalog.getString('Cannot Create Wallet'), err,
function() {
retryCount = 0;
return $scope.createDefaultWallet();
}, gettextCatalog.getString('Retry'));
} else {
return $scope.createDefaultWallet();
}
}, 2000);
};
ongoingProcess.set('creatingWallet', false);
var wallet = walletClient;
var walletId = wallet.credentials.walletId;
if (!usePushNotifications) {
$state.go('onboarding.backupRequest', {
walletId: walletId
});
} else {
$state.go('onboarding.notifications', {
walletId: walletId
});
}
});
return $timeout(function() {
$log.warn('Retrying to create default wallet.....:' + ++retryCount);
if (retryCount > 3) {
ongoingProcess.set('creatingWallet', false);
popupService.showAlert(
gettextCatalog.getString('Cannot Create Wallet'), err,
function() {
retryCount = 0;
return $scope.createDefaultWallet();
}, gettextCatalog.getString('Retry'));
} else {
return $scope.createDefaultWallet();
}
}, 2000);
};
ongoingProcess.set('creatingWallet', false);
var wallet = walletClient;
var walletId = wallet.credentials.walletId;
if (!usePushNotifications) {
$state.go('onboarding.backupRequest', {
walletId: walletId
});
} else {
$state.go('onboarding.notifications', {
walletId: walletId
});
}
});
}, 300);
};
$scope.goBack = function() {