From 98ab5dc81048d47d08a231f17698128f959e59b2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Aug 2021 16:14:11 +0200 Subject: Remove useless async --- .../+videos/+video-edit/shared/video-caption-add-modal.component.ts | 2 +- client/src/app/+videos/+video-edit/shared/video-edit.component.ts | 2 +- .../+video-watch/shared/information/privacy-concerns.component.ts | 3 ++- client/src/app/+videos/+video-watch/video-watch.component.ts | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'client/src/app/+videos') diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts index 98d66ff00..5c4152884 100644 --- a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts @@ -71,7 +71,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni return languageId && this.existingCaptions.includes(languageId) } - async addCaption () { + addCaption () { const languageId = this.form.value['language'] const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts index 366c93a79..bf7fdeeed 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts @@ -231,7 +231,7 @@ export class VideoEditComponent implements OnInit, OnDestroy { this.sortVideoCaptions() } - async deleteCaption (caption: VideoCaptionEdit) { + deleteCaption (caption: VideoCaptionEdit) { // Caption recovers his former state if (caption.action && this.initialVideoCaptions.includes(caption.language.id)) { caption.action = undefined diff --git a/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts b/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts index ef5c8ed87..b1e8bf989 100644 --- a/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts +++ b/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts @@ -21,8 +21,9 @@ export class PrivacyConcernsComponent implements OnInit { private serverService: ServerService ) { } - async ngOnInit () { + ngOnInit () { this.serverConfig = this.serverService.getHTMLConfig() + if ( isWebRTCDisabled() || this.serverConfig.tracker.enabled === false || diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index 2007bdecb..acfd46a41 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts @@ -113,7 +113,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { return this.userService.getAnonymousUser() } - async ngOnInit () { + ngOnInit () { this.serverConfig = this.serverService.getHTMLConfig() PeertubePlayerManager.initState() @@ -640,7 +640,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { } if (oldVideo && oldVideo.id !== newVideo.id) { - await this.peertubeSocket.unsubscribeLiveVideos(oldVideo.id) + this.peertubeSocket.unsubscribeLiveVideos(oldVideo.id) } if (!newVideo.isLive) return -- cgit v1.2.3