notify when email was re-send

This commit is contained in:
Gustavo Maximiliano Cortez 2014-12-19 16:05:52 -03:00
commit 188a0d348c
2 changed files with 18 additions and 7 deletions

View file

@ -1,19 +1,25 @@
'use strict';
angular.module('copayApp.controllers').controller('IndexController', function($scope, go, isCordova, identityService, notification) {
angular.module('copayApp.controllers').controller('IndexController', function($scope, $timeout, go, isCordova, identityService, notification) {
$scope.init = function() {
};
$scope.resendVerificationEmail = function() {
$scope.loading = true;
identityService.resendVerificationEmail(function(err) {
if (err) {
notification.error('Could not send email', 'There was a problem sending the verification email.');
setTimeout(function() {
$scope.$digest();
}, 1);
return;
notification.error('Could not send email', 'There was a problem sending the verification email.');
}
else {
notification.success('Email sent', 'Check your inbox and confirms the email');
$scope.hideReSendButton = true;
}
$scope.loading = null;
$timeout(function() {
$scope.$digest();
}, 1);
return;
});
};