From 3c047e6b28082b7a152e366013afeb36b65f7bfc Mon Sep 17 00:00:00 2001 From: Nodeful Date: Fri, 30 Jul 2021 02:54:37 +0300 Subject: [PATCH] manually deteching changes on some sliders --- .../advanced-equalizer/advanced-equalizer.component.ts | 1 + .../equalizers/basic-equalizer/basic-equalizer.component.ts | 1 + ui/src/app/sections/settings/settings.component.ts | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/app/sections/effects/equalizers/advanced-equalizer/advanced-equalizer.component.ts b/ui/src/app/sections/effects/equalizers/advanced-equalizer/advanced-equalizer.component.ts index 5567ee4..f4e249b 100644 --- a/ui/src/app/sections/effects/equalizers/advanced-equalizer/advanced-equalizer.component.ts +++ b/ui/src/app/sections/effects/equalizers/advanced-equalizer/advanced-equalizer.component.ts @@ -233,6 +233,7 @@ export class AdvancedEqualizerComponent extends EqualizerComponent implements On this.setSelectedPresetsGains() } + this.change.detectChanges() this.service.updatePreset(manualPreset, { select: true, transition: event.transition diff --git a/ui/src/app/sections/effects/equalizers/basic-equalizer/basic-equalizer.component.ts b/ui/src/app/sections/effects/equalizers/basic-equalizer/basic-equalizer.component.ts index eed8eb7..4ca6c0d 100644 --- a/ui/src/app/sections/effects/equalizers/basic-equalizer/basic-equalizer.component.ts +++ b/ui/src/app/sections/effects/equalizers/basic-equalizer/basic-equalizer.component.ts @@ -169,6 +169,7 @@ export class BasicEqualizerComponent extends EqualizerComponent implements OnIni if (!event.transition) { this.setSelectedPresetsGains() } + this.change.detectChanges() await this.service.updatePreset(manualPreset, { select: true, transition: event.transition diff --git a/ui/src/app/sections/settings/settings.component.ts b/ui/src/app/sections/settings/settings.component.ts index 8378d0a..ea7a6fd 100644 --- a/ui/src/app/sections/settings/settings.component.ts +++ b/ui/src/app/sections/settings/settings.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core' +import { ChangeDetectorRef, Component, OnInit } from '@angular/core' import { CheckboxOption, ButtonOption, Options, SelectOption, DividerOption, FlatSliderOption, LabelOption, ValueScreenOption } from 'src/app/components/options/options.component' import { SettingsService, IconMode } from './settings.service' import { ApplicationService } from '../../services/app.service' @@ -208,6 +208,7 @@ before they go out to all users. scrollEnabled: false, userChangedValue: event => { this.setUIScaleScreenValue() + this.changeRef.detectChanges() if (this.uiScaleSliderDebounceTimer) { clearTimeout(this.uiScaleSliderDebounceTimer) } @@ -333,7 +334,8 @@ before they go out to all users. public app: ApplicationService, public dialog: MatDialog, public ui: UIService, - public analytics: AnalyticsService + public analytics: AnalyticsService, + private readonly changeRef: ChangeDetectorRef ) { }