fix: shows user correct challenge when showing won challenge modal

This commit is contained in:
Husman
2016-08-07 16:27:18 -07:00
parent 6dfa93dab2
commit acc9e8ca7f

View File

@@ -97,7 +97,9 @@ habitrpg.controller('NotificationCtrl',
$rootScope.openModal('rebirthEnabled');
break;
case 'WON_CHALLENGE':
$rootScope.openModal('wonChallenge', {controller: 'UserCtrl', size: 'sm'});
User.sync().then( function() {
$rootScope.openModal('wonChallenge', {controller: 'UserCtrl', size: 'sm'});
});
break;
case 'STREAK_ACHIEVEMENT':
Notification.streak(User.user.achievements.streak);