mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix(client): Refresh party page when inviting users
This commit is contained in:
@@ -22,8 +22,6 @@ habitrpg.controller('InviteToGroupCtrl', ['$scope', '$rootScope', 'User', 'Group
|
||||
return Groups.Group.create($scope.group)
|
||||
.then(function(response) {
|
||||
$scope.group = response.data.data;
|
||||
User.sync();
|
||||
Groups.data.party = $scope.group;
|
||||
_inviteByMethod(inviteMethod);
|
||||
});
|
||||
}
|
||||
@@ -48,13 +46,12 @@ habitrpg.controller('InviteToGroupCtrl', ['$scope', '$rootScope', 'User', 'Group
|
||||
.then(function() {
|
||||
Notification.text(window.env.t('invitationsSent'));
|
||||
_resetInvitees();
|
||||
if ($scope.group.type === 'party') {
|
||||
Groups.removePartyCache();
|
||||
$rootScope.$state.go('options.social.party');
|
||||
return;
|
||||
}
|
||||
|
||||
if ($scope.group.type === 'party') {
|
||||
$rootScope.hardRedirect('/#/options/groups/party');
|
||||
} else {
|
||||
$rootScope.hardRedirect('/#/options/groups/guilds/' + $scope.group._id);
|
||||
}
|
||||
}, function(){
|
||||
_resetInvitees();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user