diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-17 14:42:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-18 08:35:06 +0200 |
commit | 9df52d660feb722404be00a50f3c8a612bec1c15 (patch) | |
tree | dde52880fa012874d24c60f64eb596b0a789cc8b /client/src/app/shared/shared-user-subscription/user-subscription.service.ts | |
parent | adb8809d43648ea0a64d6845bb39aa3bd0e005a6 (diff) | |
download | PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.gz PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.tar.zst PeerTube-9df52d660feb722404be00a50f3c8a612bec1c15.zip |
Migrate client to eslint
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 | 20 |
1 files changed, 10 insertions, 10 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 bb44660d2..e4fc09b36 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 | |||
@@ -46,8 +46,8 @@ export class UserSubscriptionService { | |||
46 | } | 46 | } |
47 | 47 | ||
48 | getUserSubscriptionVideos (parameters: { | 48 | getUserSubscriptionVideos (parameters: { |
49 | videoPagination: ComponentPaginationLight, | 49 | videoPagination: ComponentPaginationLight |
50 | sort: VideoSortField, | 50 | sort: VideoSortField |
51 | skipCount?: boolean | 51 | skipCount?: boolean |
52 | }): Observable<ResultList<Video>> { | 52 | }): Observable<ResultList<Video>> { |
53 | const { videoPagination, sort, skipCount } = parameters | 53 | const { videoPagination, sort, skipCount } = parameters |
@@ -131,16 +131,16 @@ export class UserSubscriptionService { | |||
131 | 131 | ||
132 | listenToSubscriptionCacheChange (nameWithHost: string) { | 132 | listenToSubscriptionCacheChange (nameWithHost: string) { |
133 | if (nameWithHost in this.myAccountSubscriptionCacheObservable) { | 133 | if (nameWithHost in this.myAccountSubscriptionCacheObservable) { |
134 | return this.myAccountSubscriptionCacheObservable[ nameWithHost ] | 134 | return this.myAccountSubscriptionCacheObservable[nameWithHost] |
135 | } | 135 | } |
136 | 136 | ||
137 | const obs = this.existsObservable | 137 | const obs = this.existsObservable |
138 | .pipe( | 138 | .pipe( |
139 | filter(existsResult => existsResult[ nameWithHost ] !== undefined), | 139 | filter(existsResult => existsResult[nameWithHost] !== undefined), |
140 | map(existsResult => existsResult[ nameWithHost ]) | 140 | map(existsResult => existsResult[nameWithHost]) |
141 | ) | 141 | ) |
142 | 142 | ||
143 | this.myAccountSubscriptionCacheObservable[ nameWithHost ] = obs | 143 | this.myAccountSubscriptionCacheObservable[nameWithHost] = obs |
144 | return obs | 144 | return obs |
145 | } | 145 | } |
146 | 146 | ||
@@ -150,16 +150,16 @@ export class UserSubscriptionService { | |||
150 | if (nameWithHost in this.myAccountSubscriptionCache) { | 150 | if (nameWithHost in this.myAccountSubscriptionCache) { |
151 | logger('Found cache for %d.', nameWithHost) | 151 | logger('Found cache for %d.', nameWithHost) |
152 | 152 | ||
153 | return of(this.myAccountSubscriptionCache[ nameWithHost ]) | 153 | return of(this.myAccountSubscriptionCache[nameWithHost]) |
154 | } | 154 | } |
155 | 155 | ||
156 | this.existsSubject.next(nameWithHost) | 156 | this.existsSubject.next(nameWithHost) |
157 | 157 | ||
158 | logger('Fetching from network for %d.', nameWithHost) | 158 | logger('Fetching from network for %d.', nameWithHost) |
159 | return this.existsObservable.pipe( | 159 | return this.existsObservable.pipe( |
160 | filter(existsResult => existsResult[ nameWithHost ] !== undefined), | 160 | filter(existsResult => existsResult[nameWithHost] !== undefined), |
161 | map(existsResult => existsResult[ nameWithHost ]), | 161 | map(existsResult => existsResult[nameWithHost]), |
162 | tap(result => this.myAccountSubscriptionCache[ nameWithHost ] = result) | 162 | tap(result => this.myAccountSubscriptionCache[nameWithHost] = result) |
163 | ) | 163 | ) |
164 | } | 164 | } |
165 | 165 | ||