From: Chocobozzz Date: Fri, 28 Jul 2023 13:43:09 +0000 (+0200) Subject: Remove unnecessary workarounds X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=f9ac050a354ee91356aa342d10b49033d8b79fe0;p=github%2FChocobozzz%2FPeerTube.git Remove unnecessary workarounds Has been fixed upstream --- diff --git a/client/src/app/+videos/+video-edit/shared/video-upload.service.ts b/client/src/app/+videos/+video-edit/shared/video-upload.service.ts index cb9503503..50ca1a60b 100644 --- a/client/src/app/+videos/+video-edit/shared/video-upload.service.ts +++ b/client/src/app/+videos/+video-edit/shared/video-upload.service.ts @@ -3,7 +3,6 @@ import { HttpErrorResponse, HttpEventType, HttpHeaders } from '@angular/common/h import { Injectable } from '@angular/core' import { AuthService, Notifier, ServerService } from '@app/core' import { BytesPipe, VideoService } from '@app/shared/shared-main' -import { isIOS } from '@root-helpers/web-browser' import { HttpStatusCode } from '@shared/models' import { UploaderXFormData } from './uploaderx-form-data' @@ -64,17 +63,11 @@ export class VideoUploadService { } private getUploadxOptions (endpoint: string, uploaderClass: typeof UploaderXFormData) { - // FIXME: https://github.com/Chocobozzz/PeerTube/issues/4382#issuecomment-915854167 - const chunkSize = isIOS() - ? 0 - : undefined // Auto chunk size - return { endpoint, multiple: false, maxChunkSize: this.server.getHTMLConfig().client.videos.resumableUpload.maxChunkSize, - chunkSize, token: this.authService.getAccessToken(), diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts index cfa42910b..f7e1872a5 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts @@ -158,8 +158,7 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy break case 'uploading': - // TODO: remove || 0 when // https://github.com/kukhariev/ngx-uploadx/pull/368 is released - this.videoUploadPercents = state.progress || 0 + this.videoUploadPercents = state.progress break case 'paused': diff --git a/client/src/app/shared/shared-forms/peertube-checkbox.component.ts b/client/src/app/shared/shared-forms/peertube-checkbox.component.ts index 76ef77e5a..f71eb3d34 100644 --- a/client/src/app/shared/shared-forms/peertube-checkbox.component.ts +++ b/client/src/app/shared/shared-forms/peertube-checkbox.component.ts @@ -1,4 +1,4 @@ -import { AfterContentInit, ChangeDetectorRef, Component, ContentChildren, forwardRef, Input, QueryList, TemplateRef } from '@angular/core' +import { AfterContentInit, Component, ContentChildren, forwardRef, Input, QueryList, TemplateRef } from '@angular/core' import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' import { PeerTubeTemplateDirective } from '@app/shared/shared-main' @@ -25,14 +25,9 @@ export class PeertubeCheckboxComponent implements ControlValueAccessor, AfterCon @ContentChildren(PeerTubeTemplateDirective) templates: QueryList> - // FIXME: https://github.com/angular/angular/issues/10816#issuecomment-307567836 - @Input() onPushWorkaround = false - labelTemplate: TemplateRef helpTemplate: TemplateRef - constructor (private cdr: ChangeDetectorRef) { } - ngAfterContentInit () { { const t = this.templates.find(t => t.name === 'label') @@ -49,10 +44,6 @@ export class PeertubeCheckboxComponent implements ControlValueAccessor, AfterCon writeValue (checked: boolean) { this.checked = checked - - if (this.onPushWorkaround) { - this.cdr.markForCheck() - } } registerOnChange (fn: (_: any) => void) { diff --git a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.html b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.html index f2f69236c..4aaccd50d 100644 --- a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.html +++ b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.html @@ -17,7 +17,7 @@