mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
fixes #1936. petCount was only being calculated for the current user, not for the profile being displayed. This data should probably be calculated in the model rather than in a controller
This commit is contained in:
@@ -65,6 +65,8 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Groups', '$http', 'A
|
||||
}
|
||||
// We watch Members.selectedMember because it's asynchronously set, so would be a hassle to handle updates here
|
||||
$scope.$watch( function() { return Members.selectedMember; }, function (member) {
|
||||
if(member)
|
||||
member.petCount = window.habitrpgShared.helpers.countPets(null, member.items.pets);
|
||||
$scope.profile = member;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ p
|
||||
span(popover-trigger='mouseenter', popover='(Level-1)/2') {{userDef(profile.stats.lvl)}}
|
||||
p
|
||||
strong Pets Found
|
||||
| : {{petCount}}
|
||||
| : {{profile.petCount}}
|
||||
hr
|
||||
p
|
||||
strong Total Experience Boost
|
||||
|
||||
Reference in New Issue
Block a user