mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-07 19:25:47 +00:00
fix(client): Refresh party page when inviting users
This commit is contained in:
parent
851ad59fb8
commit
a4dba82d14
1 changed files with 5 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
$rootScope.hardRedirect('/#/options/groups/guilds/' + $scope.group._id);
|
||||
if ($scope.group.type === 'party') {
|
||||
$rootScope.hardRedirect('/#/options/groups/party');
|
||||
} else {
|
||||
$rootScope.hardRedirect('/#/options/groups/guilds/' + $scope.group._id);
|
||||
}
|
||||
}, function(){
|
||||
_resetInvitees();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue