diff options
Diffstat (limited to 'client/src/app/shared/user-subscription')
-rw-r--r-- | client/src/app/shared/user-subscription/subscribe-button.component.ts | 2 | ||||
-rw-r--r-- | client/src/app/shared/user-subscription/user-subscription.service.ts | 6 |
2 files changed, 4 insertions, 4 deletions
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 { | |||
38 | 38 | ||
39 | ngOnInit () { | 39 | ngOnInit () { |
40 | if (this.isUserLoggedIn()) { | 40 | if (this.isUserLoggedIn()) { |
41 | this.userSubscriptionService.isSubscriptionExists(this.uri) | 41 | this.userSubscriptionService.doesSubscriptionExist(this.uri) |
42 | .subscribe( | 42 | .subscribe( |
43 | res => this.subscribed = res[this.uri], | 43 | res => this.subscribed = res[this.uri], |
44 | 44 | ||
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 { | |||
28 | this.existsObservable = this.existsSubject.pipe( | 28 | this.existsObservable = this.existsSubject.pipe( |
29 | bufferTime(500), | 29 | bufferTime(500), |
30 | filter(uris => uris.length !== 0), | 30 | filter(uris => uris.length !== 0), |
31 | switchMap(uris => this.areSubscriptionExist(uris)), | 31 | switchMap(uris => this.doSubscriptionsExist(uris)), |
32 | share() | 32 | share() |
33 | ) | 33 | ) |
34 | } | 34 | } |
@@ -69,13 +69,13 @@ export class UserSubscriptionService { | |||
69 | ) | 69 | ) |
70 | } | 70 | } |
71 | 71 | ||
72 | isSubscriptionExists (nameWithHost: string) { | 72 | doesSubscriptionExist (nameWithHost: string) { |
73 | this.existsSubject.next(nameWithHost) | 73 | this.existsSubject.next(nameWithHost) |
74 | 74 | ||
75 | return this.existsObservable.pipe(first()) | 75 | return this.existsObservable.pipe(first()) |
76 | } | 76 | } |
77 | 77 | ||
78 | private areSubscriptionExist (uris: string[]): Observable<SubscriptionExistResult> { | 78 | private doSubscriptionsExist (uris: string[]): Observable<SubscriptionExistResult> { |
79 | const url = UserSubscriptionService.BASE_USER_SUBSCRIPTIONS_URL + '/exist' | 79 | const url = UserSubscriptionService.BASE_USER_SUBSCRIPTIONS_URL + '/exist' |
80 | let params = new HttpParams() | 80 | let params = new HttpParams() |
81 | 81 | ||