aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-23 17:47:58 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-23 17:47:58 +0200
commit93c462b77170669df40c60db68db112198082ab9 (patch)
tree0bfd5f1403727a6ee96f93a209feeac8fffd025d /client
parent039cdfc528a26ddb19b0b3bcdf09f825723b37b5 (diff)
downloadPeerTube-93c462b77170669df40c60db68db112198082ab9.tar.gz
PeerTube-93c462b77170669df40c60db68db112198082ab9.tar.zst
PeerTube-93c462b77170669df40c60db68db112198082ab9.zip
Client: refresh friends list after quitting them
Diffstat (limited to 'client')
-rw-r--r--client/src/app/admin/friends/friend-list/friend-list.component.ts15
1 files changed, 10 insertions, 5 deletions
diff --git a/client/src/app/admin/friends/friend-list/friend-list.component.ts b/client/src/app/admin/friends/friend-list/friend-list.component.ts
index 379d44c97..38d4799a6 100644
--- a/client/src/app/admin/friends/friend-list/friend-list.component.ts
+++ b/client/src/app/admin/friends/friend-list/friend-list.component.ts
@@ -15,11 +15,7 @@ export class FriendListComponent implements OnInit {
15 constructor(private friendService: FriendService) { } 15 constructor(private friendService: FriendService) { }
16 16
17 ngOnInit() { 17 ngOnInit() {
18 this.friendService.getFriends().subscribe( 18 this.getFriends();
19 friends => this.friends = friends,
20
21 err => alert(err)
22 );
23 } 19 }
24 20
25 quitFriends() { 21 quitFriends() {
@@ -28,8 +24,17 @@ export class FriendListComponent implements OnInit {
28 this.friendService.quitFriends().subscribe( 24 this.friendService.quitFriends().subscribe(
29 status => { 25 status => {
30 alert('Quit friends!'); 26 alert('Quit friends!');
27 this.getFriends();
31 }, 28 },
32 error => alert(error) 29 error => alert(error)
33 ); 30 );
34 } 31 }
32
33 private getFriends() {
34 this.friendService.getFriends().subscribe(
35 friends => this.friends = friends,
36
37 err => alert(err)
38 );
39 }
35} 40}