From f0a3988066f72a28bb44520af072f18d91d77dde Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Mar 2019 17:06:00 +0100 Subject: Add to playlist dropdown --- .../src/app/shared/user-subscription/subscribe-button.component.ts | 2 +- .../src/app/shared/user-subscription/user-subscription.service.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'client/src/app/shared/user-subscription') diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.ts b/client/src/app/shared/user-subscription/subscribe-button.component.ts index 8f1754c7f..ef470ee44 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.ts +++ b/client/src/app/shared/user-subscription/subscribe-button.component.ts @@ -38,7 +38,7 @@ export class SubscribeButtonComponent implements OnInit { ngOnInit () { if (this.isUserLoggedIn()) { - this.userSubscriptionService.isSubscriptionExists(this.uri) + this.userSubscriptionService.doesSubscriptionExist(this.uri) .subscribe( res => this.subscribed = res[this.uri], diff --git a/client/src/app/shared/user-subscription/user-subscription.service.ts b/client/src/app/shared/user-subscription/user-subscription.service.ts index 3d05f071e..cfd5b100f 100644 --- a/client/src/app/shared/user-subscription/user-subscription.service.ts +++ b/client/src/app/shared/user-subscription/user-subscription.service.ts @@ -28,7 +28,7 @@ export class UserSubscriptionService { this.existsObservable = this.existsSubject.pipe( bufferTime(500), filter(uris => uris.length !== 0), - switchMap(uris => this.areSubscriptionExist(uris)), + switchMap(uris => this.doSubscriptionsExist(uris)), share() ) } @@ -69,13 +69,13 @@ export class UserSubscriptionService { ) } - isSubscriptionExists (nameWithHost: string) { + doesSubscriptionExist (nameWithHost: string) { this.existsSubject.next(nameWithHost) return this.existsObservable.pipe(first()) } - private areSubscriptionExist (uris: string[]): Observable { + private doSubscriptionsExist (uris: string[]): Observable { const url = UserSubscriptionService.BASE_USER_SUBSCRIPTIONS_URL + '/exist' let params = new HttpParams() -- cgit v1.2.3