diff options
Diffstat (limited to 'client/src/app/shared/shared-user-subscription/user-subscription.service.ts')
-rw-r--r-- | client/src/app/shared/shared-user-subscription/user-subscription.service.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/shared/shared-user-subscription/user-subscription.service.ts b/client/src/app/shared/shared-user-subscription/user-subscription.service.ts index 33a2d04fd..9cf6b4d16 100644 --- a/client/src/app/shared/shared-user-subscription/user-subscription.service.ts +++ b/client/src/app/shared/shared-user-subscription/user-subscription.service.ts | |||
@@ -9,7 +9,7 @@ import { Video, VideoChannel, VideoChannelService, VideoService } from '@app/sha | |||
9 | import { ActorFollow, ResultList, VideoChannel as VideoChannelServer, VideoSortField } from '@shared/models' | 9 | import { ActorFollow, ResultList, VideoChannel as VideoChannelServer, VideoSortField } from '@shared/models' |
10 | import { environment } from '../../../environments/environment' | 10 | import { environment } from '../../../environments/environment' |
11 | 11 | ||
12 | const logger = debug('peertube:subscriptions:UserSubscriptionService') | 12 | const debugLogger = debug('peertube:subscriptions:UserSubscriptionService') |
13 | 13 | ||
14 | type SubscriptionExistResult = { [ uri: string ]: boolean } | 14 | type SubscriptionExistResult = { [ uri: string ]: boolean } |
15 | type SubscriptionExistResultObservable = { [ uri: string ]: Observable<boolean> } | 15 | type SubscriptionExistResultObservable = { [ uri: string ]: Observable<boolean> } |
@@ -176,17 +176,17 @@ export class UserSubscriptionService { | |||
176 | } | 176 | } |
177 | 177 | ||
178 | doesSubscriptionExist (nameWithHost: string) { | 178 | doesSubscriptionExist (nameWithHost: string) { |
179 | logger('Running subscription check for %d.', nameWithHost) | 179 | debugLogger('Running subscription check for %d.', nameWithHost) |
180 | 180 | ||
181 | if (nameWithHost in this.myAccountSubscriptionCache) { | 181 | if (nameWithHost in this.myAccountSubscriptionCache) { |
182 | logger('Found cache for %d.', nameWithHost) | 182 | debugLogger('Found cache for %d.', nameWithHost) |
183 | 183 | ||
184 | return of(this.myAccountSubscriptionCache[nameWithHost]) | 184 | return of(this.myAccountSubscriptionCache[nameWithHost]) |
185 | } | 185 | } |
186 | 186 | ||
187 | this.existsSubject.next(nameWithHost) | 187 | this.existsSubject.next(nameWithHost) |
188 | 188 | ||
189 | logger('Fetching from network for %d.', nameWithHost) | 189 | debugLogger('Fetching from network for %d.', nameWithHost) |
190 | return this.existsObservable.pipe( | 190 | return this.existsObservable.pipe( |
191 | filter(existsResult => existsResult[nameWithHost] !== undefined), | 191 | filter(existsResult => existsResult[nameWithHost] !== undefined), |
192 | map(existsResult => existsResult[nameWithHost]), | 192 | map(existsResult => existsResult[nameWithHost]), |