mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
Updated ui when user rejects a guild invite (#7368)
This commit is contained in:
committed by
Matteo Pagliazzi
parent
283c2a0823
commit
5e30aeb24c
@@ -69,8 +69,10 @@ habitrpg.controller("GuildsCtrl", ['$scope', 'Groups', 'User', 'Challenges', '$r
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.reject = function(guild) {
|
$scope.reject = function(invitationToReject) {
|
||||||
Groups.Group.rejectInvite(guild.id);
|
var index = _.findIndex(User.user.invitations.guilds, function(invite) { return invite.id === invitationToReject.id; });
|
||||||
|
User.user.invitations.guilds = User.user.invitations.guilds.splice(0, index);
|
||||||
|
Groups.Group.rejectInvite(invitationToReject.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.leave = function(keep) {
|
$scope.leave = function(keep) {
|
||||||
|
|||||||
Reference in New Issue
Block a user