bugfix: widthoverride label being none% (#3030)

This commit is contained in:
Marius Werkmeister 2024-06-30 19:20:14 +02:00 committed by GitHub
parent be6285b9d4
commit 5f0859c202
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -594,6 +594,9 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
takeUntilDestroyed(this.destroyRef)
).subscribe(() => {});
//sets the default override to 0, fixing the none% bug
this.generalSettingsForm.get('widthSlider')!.setValue(0);
//send the current width override value to the label
this.widthOverrideLabel$ = this.readerSettings$?.pipe(
map(values => (parseInt(values.widthSlider) <= 0) ? '' : values.widthSlider + '%'),