mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 01:29:21 +00:00
v3 client: correctly redirect after inviting
This commit is contained in:
parent
163b5b4ac3
commit
58b9a08539
1 changed files with 8 additions and 1 deletions
|
|
@ -48,7 +48,14 @@ habitrpg.controller('InviteToGroupCtrl', ['$scope', '$rootScope', 'User', 'Group
|
|||
.then(function() {
|
||||
Notification.text(window.env.t('invitationsSent'));
|
||||
_resetInvitees();
|
||||
$rootScope.hardRedirect('/#/options/groups/party');
|
||||
var redirectTo = '/#/options/groups/'
|
||||
if ($scope.group.type === 'party') {
|
||||
redirectTo += 'party';
|
||||
} else {
|
||||
redirectTo += ('guilds/' + $scope.group._id);
|
||||
}
|
||||
|
||||
$rootScope.hardRedirect(redirectTo);
|
||||
}, function(){
|
||||
_resetInvitees();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue