diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-29 11:46:26 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-29 11:46:26 +0100 |
commit | 9744bb2ae8284c4589b66055c1d99997abf18748 (patch) | |
tree | ad0a5d3d3c44ac34cab4b96ca21d9365b2034d85 /client/src/app/shared/shared-video-playlist | |
parent | 29aedac8dcfc98ff67680d91d6f0f848e86fa4db (diff) | |
download | PeerTube-9744bb2ae8284c4589b66055c1d99997abf18748.tar.gz PeerTube-9744bb2ae8284c4589b66055c1d99997abf18748.tar.zst PeerTube-9744bb2ae8284c4589b66055c1d99997abf18748.zip |
Fix ngx loading bar deprecation
Diffstat (limited to 'client/src/app/shared/shared-video-playlist')
-rw-r--r-- | client/src/app/shared/shared-video-playlist/video-playlist.service.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts index 3faf81d11..44d930b07 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts | |||
@@ -1,11 +1,12 @@ | |||
1 | import * as debug from 'debug' | 1 | import * as debug from 'debug' |
2 | import { merge, Observable, of, ReplaySubject, Subject } from 'rxjs' | 2 | import { merge, Observable, of, ReplaySubject, Subject } from 'rxjs' |
3 | import { catchError, filter, map, share, switchMap, tap } from 'rxjs/operators' | 3 | import { catchError, filter, map, share, switchMap, tap } from 'rxjs/operators' |
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpContext, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { AuthUser, ComponentPaginationLight, RestExtractor, RestService, ServerService } from '@app/core' | 6 | import { AuthUser, ComponentPaginationLight, RestExtractor, RestService, ServerService } from '@app/core' |
7 | import { buildBulkObservable, objectToFormData } from '@app/helpers' | 7 | import { buildBulkObservable, objectToFormData } from '@app/helpers' |
8 | import { Account, AccountService, VideoChannel, VideoChannelService } from '@app/shared/shared-main' | 8 | import { Account, AccountService, VideoChannel, VideoChannelService } from '@app/shared/shared-main' |
9 | import { NGX_LOADING_BAR_IGNORED } from '@ngx-loading-bar/http-client' | ||
9 | import { | 10 | import { |
10 | ResultList, | 11 | ResultList, |
11 | VideoExistInPlaylist, | 12 | VideoExistInPlaylist, |
@@ -350,7 +351,7 @@ export class VideoPlaylistService { | |||
350 | let params = new HttpParams() | 351 | let params = new HttpParams() |
351 | params = this.restService.addObjectParams(params, { videoIds }) | 352 | params = this.restService.addObjectParams(params, { videoIds }) |
352 | 353 | ||
353 | return this.authHttp.get<VideoExistInPlaylist>(url, { params, headers: { ignoreLoadingBar: '' } }) | 354 | return this.authHttp.get<VideoExistInPlaylist>(url, { params, context: new HttpContext().set(NGX_LOADING_BAR_IGNORED, true) }) |
354 | .pipe(catchError(err => this.restExtractor.handleError(err))) | 355 | .pipe(catchError(err => this.restExtractor.handleError(err))) |
355 | } | 356 | } |
356 | } | 357 | } |