Fix group membership status not immediately refresh after leaving/join

master
Max 5 years ago
parent 985a0a4f1d
commit 08872565f9

@ -154,6 +154,7 @@ export class GroupComponent implements OnInit {
this.requestService.joinGroup(group.id)
.subscribe(() => {
this.datasharingService.addGroupToUser(group);
this.groupProfile.joined = true;
});
}
@ -190,6 +191,8 @@ export class GroupComponent implements OnInit {
leaveGroup() {
this.groupService.leaveGroup(this.groupProfile.id).subscribe(response => {
this.groupProfile.joined = false;
// tslint:disable-next-line:max-line-length
this.groupProfile.allowedToJoinGroup = this.requestService.isAllowedToJoinGroup(this.groupProfile.id, this.self);
});
}

Loading…
Cancel
Save