From 94a8ecbf2b3ac2a888327a8718900780311bcde5 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Thu, 18 Dec 2014 16:04:00 -0300 Subject: [PATCH] give feedback to the user --- js/controllers/index.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/js/controllers/index.js b/js/controllers/index.js index d3ac91d4a..8e1f4e689 100644 --- a/js/controllers/index.js +++ b/js/controllers/index.js @@ -1,12 +1,20 @@ 'use strict'; -angular.module('copayApp.controllers').controller('IndexController', function($scope, go, isCordova, identityService) { +angular.module('copayApp.controllers').controller('IndexController', function($scope, go, isCordova, identityService, notification) { $scope.init = function() { }; - $scope.resendVerificationEmail = function () { - identityService.resendVerificationEmail(function () {}); + $scope.resendVerificationEmail = function() { + 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; + } + }); }; $scope.swipe = function(invert) {