X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Badmin%2Ffollows%2Ffollowing-list%2Ffollowing-list.component.ts;h=ad1bd453674862d6352b98350b897eb07405ad92;hb=1f30a1853e38c20a45722dbd6d38aaaec63839e8;hp=d4f8d0309ea4414036fd90c5c1a43fb663917790;hpb=78967fca4cacbc247fa6fb62d64b2d6825a10804;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts index d4f8d0309..ad1bd4536 100644 --- a/client/src/app/+admin/follows/following-list/following-list.component.ts +++ b/client/src/app/+admin/follows/following-list/following-list.component.ts @@ -25,20 +25,17 @@ export class FollowingListComponent extends RestTable { super() } - removeFollowing (follow: AccountFollow) { - this.confirmService.confirm(`Do you really want to unfollow ${follow.following.host}?`, 'Unfollow').subscribe( - res => { - if (res === false) return + async removeFollowing (follow: AccountFollow) { + const res = await this.confirmService.confirm(`Do you really want to unfollow ${follow.following.host}?`, 'Unfollow') + if (res === false) return - this.followService.unfollow(follow).subscribe( - () => { - this.notificationsService.success('Success', `You are not following ${follow.following.host} anymore.`) - this.loadData() - }, + this.followService.unfollow(follow).subscribe( + () => { + this.notificationsService.success('Success', `You are not following ${follow.following.host} anymore.`) + this.loadData() + }, - err => this.notificationsService.error('Error', err.message) - ) - } + err => this.notificationsService.error('Error', err.message) ) }