Handle options within blink state manager

This commit is contained in:
Daniel Imms
2026-02-03 03:55:25 -08:00
parent 0d2a58c9d0
commit f3a7cac49f
3 changed files with 11 additions and 7 deletions
@@ -5,6 +5,7 @@
import { ICoreBrowserService } from 'browser/services/Services';
import { Disposable, toDisposable } from 'common/Lifecycle';
import { IOptionsService } from 'common/services/Services';
export class TextBlinkStateManager extends Disposable {
private _intervalDuration: number = 0;
@@ -13,9 +14,14 @@ export class TextBlinkStateManager extends Disposable {
constructor(
private readonly _renderCallback: () => void,
private readonly _coreBrowserService: ICoreBrowserService
private readonly _coreBrowserService: ICoreBrowserService,
private readonly _optionsService: IOptionsService
) {
super();
this._register(this._optionsService.onSpecificOptionChange('blinkIntervalDuration', duration => {
this.setIntervalDuration(duration);
}));
this.setIntervalDuration(this._optionsService.rawOptions.blinkIntervalDuration);
this._register(toDisposable(() => this._clearInterval()));
}