From 08872565f9a61864c2365e1f94eff89df5116041 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 22 Jan 2020 19:00:33 +0100 Subject: [PATCH] Fix group membership status not immediately refresh after leaving/join --- src/app/components/group/group.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/components/group/group.component.ts b/src/app/components/group/group.component.ts index ddd1a64..3a739e4 100644 --- a/src/app/components/group/group.component.ts +++ b/src/app/components/group/group.component.ts @@ -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); }); }