mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user