Skip to content

Commit

Permalink
chore: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
wzhudev committed Oct 18, 2024
1 parent e0cca8e commit c9528b0
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,30 +81,30 @@ export class TriggerCalculationController extends Disposable {
private readonly _progress$ = new BehaviorSubject<ICalculationProgress>(NilProgress);
readonly progress$ = this._progress$.asObservable();

private _updateProgress(): void {
private _emitProgress(): void {
this._progress$.next({ done: this._formulaCalculationDoneCount, count: this._totalCalculationTaskCount });
}

private _addTotalCount(count: number): void {
this._totalCalculationTaskCount += count;
this._updateProgress();
this._emitProgress();
}

private _addDoneTask(count: number): void {
this._formulaCalculationDoneCount += count;
this._formulaCalculationDoneCount = Math.min(this._formulaCalculationDoneCount, this._totalCalculationTaskCount);
this._updateProgress();
this._emitProgress();
}

private _completeProgress(): void {
this._formulaCalculationDoneCount = this._totalCalculationTaskCount;
this._updateProgress();
this._emitProgress();
}

private _clearPregress(): void {
private _clearProgress(): void {
this._formulaCalculationDoneCount = 0;
this._totalCalculationTaskCount = 0;
this._updateProgress();
this._emitProgress();
}

constructor(
Expand Down Expand Up @@ -372,7 +372,7 @@ export class TriggerCalculationController extends Disposable {
case FormulaExecutedStateType.STOP_EXECUTION:
result = 'The execution of the formula has been stopped';
// this._executingCommandQueue = [];
this._clearPregress();
this._clearProgress();
calculationProcessCount = 0;
break;
case FormulaExecutedStateType.SUCCESS:
Expand Down

0 comments on commit c9528b0

Please sign in to comment.