mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Final adjustments to PR #5114
* Added test for header ctrl * Made openModal function more readable * Only show setting to disable invite friends if party is exactly 1 member big * Use party.memberCount instead of party.members.length because it's more expressive
This commit is contained in:
@@ -18,10 +18,12 @@ habitrpg.controller("HeaderCtrl", ['$scope', 'Groups', 'User', '$location', '$ro
|
||||
|
||||
$scope.inviteOrStartParty = function(group) {
|
||||
if (group.type === "party") {
|
||||
$rootScope.openModal('invite-friends', {controller:'InviteToGroupCtrl', resolve:
|
||||
{injectedGroup: function(){
|
||||
return group;
|
||||
}}});
|
||||
$rootScope.openModal('invite-friends', {
|
||||
controller:'InviteToGroupCtrl',
|
||||
resolve: {
|
||||
injectedGroup: function(){ return group; }
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$location.path("/options/groups/party");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user