Commit c42591d3c395f14830fded6833eb96dde318fa10
1 parent
173fd82c
Exists in
master
and in
2 other branches
refactoring load badges and cities
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
www/js/controllers.js
| @@ -122,7 +122,6 @@ angular.module('confjuvapp.controllers', []) | @@ -122,7 +122,6 @@ angular.module('confjuvapp.controllers', []) | ||
| 122 | $scope.closeModal(); | 122 | $scope.closeModal(); |
| 123 | var popup = $ionicPopup.alert({ title: 'Login', template: 'Login efetuado com sucesso!' }); | 123 | var popup = $ionicPopup.alert({ title: 'Login', template: 'Login efetuado com sucesso!' }); |
| 124 | $scope.profile = resp.data.user.person; | 124 | $scope.profile = resp.data.user.person; |
| 125 | - $scope.setStateAndCityOfProfile(); | ||
| 126 | popup.then(function() { | 125 | popup.then(function() { |
| 127 | $scope.loginCallback(resp.data.user.private_token); | 126 | $scope.loginCallback(resp.data.user.private_token); |
| 128 | }); | 127 | }); |
| @@ -152,6 +151,8 @@ angular.module('confjuvapp.controllers', []) | @@ -152,6 +151,8 @@ angular.module('confjuvapp.controllers', []) | ||
| 152 | $scope.parseURLParams(); | 151 | $scope.parseURLParams(); |
| 153 | $scope.loadFollowedProposals(); | 152 | $scope.loadFollowedProposals(); |
| 154 | $scope.loadVotedProposals(); | 153 | $scope.loadVotedProposals(); |
| 154 | + $scope.setStateAndCityOfProfile(); | ||
| 155 | + $scope.loadMyBadges(); | ||
| 155 | }; | 156 | }; |
| 156 | 157 | ||
| 157 | // Function to retrieve password | 158 | // Function to retrieve password |
| @@ -1372,8 +1373,6 @@ angular.module('confjuvapp.controllers', []) | @@ -1372,8 +1373,6 @@ angular.module('confjuvapp.controllers', []) | ||
| 1372 | .then(function(resp) { | 1373 | .then(function(resp) { |
| 1373 | $scope.profile = resp.data.person; | 1374 | $scope.profile = resp.data.person; |
| 1374 | $scope.loginCallback(ConfJuvAppUtils.getPrivateToken()); | 1375 | $scope.loginCallback(ConfJuvAppUtils.getPrivateToken()); |
| 1375 | - $scope.loadMyBadges(); | ||
| 1376 | - $scope.setStateAndCityOfProfile(); | ||
| 1377 | $scope.checkCompleteness($scope.profile); | 1376 | $scope.checkCompleteness($scope.profile); |
| 1378 | $scope.loading = false; | 1377 | $scope.loading = false; |
| 1379 | }, function(err) { | 1378 | }, function(err) { |