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 | 122 | $scope.closeModal(); |
123 | 123 | var popup = $ionicPopup.alert({ title: 'Login', template: 'Login efetuado com sucesso!' }); |
124 | 124 | $scope.profile = resp.data.user.person; |
125 | - $scope.setStateAndCityOfProfile(); | |
126 | 125 | popup.then(function() { |
127 | 126 | $scope.loginCallback(resp.data.user.private_token); |
128 | 127 | }); |
... | ... | @@ -152,6 +151,8 @@ angular.module('confjuvapp.controllers', []) |
152 | 151 | $scope.parseURLParams(); |
153 | 152 | $scope.loadFollowedProposals(); |
154 | 153 | $scope.loadVotedProposals(); |
154 | + $scope.setStateAndCityOfProfile(); | |
155 | + $scope.loadMyBadges(); | |
155 | 156 | }; |
156 | 157 | |
157 | 158 | // Function to retrieve password |
... | ... | @@ -1372,8 +1373,6 @@ angular.module('confjuvapp.controllers', []) |
1372 | 1373 | .then(function(resp) { |
1373 | 1374 | $scope.profile = resp.data.person; |
1374 | 1375 | $scope.loginCallback(ConfJuvAppUtils.getPrivateToken()); |
1375 | - $scope.loadMyBadges(); | |
1376 | - $scope.setStateAndCityOfProfile(); | |
1377 | 1376 | $scope.checkCompleteness($scope.profile); |
1378 | 1377 | $scope.loading = false; |
1379 | 1378 | }, function(err) { | ... | ... |