aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-user-subscription/user-subscription.service.ts
diff options
context:
space:
mode:
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.ts8
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
9import { ActorFollow, ResultList, VideoChannel as VideoChannelServer, VideoSortField } from '@shared/models' 9import { ActorFollow, ResultList, VideoChannel as VideoChannelServer, VideoSortField } from '@shared/models'
10import { environment } from '../../../environments/environment' 10import { environment } from '../../../environments/environment'
11 11
12const logger = debug('peertube:subscriptions:UserSubscriptionService') 12const debugLogger = debug('peertube:subscriptions:UserSubscriptionService')
13 13
14type SubscriptionExistResult = { [ uri: string ]: boolean } 14type SubscriptionExistResult = { [ uri: string ]: boolean }
15type SubscriptionExistResultObservable = { [ uri: string ]: Observable<boolean> } 15type 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]),