Skip to content

Commit

Permalink
fix(formula): progress count reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Dushusir committed Oct 24, 2024
1 parent 91779c7 commit eef03a1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ export class TriggerCalculationController extends Disposable {
case FormulaExecutedStateType.SUCCESS:
result = 'Formula calculation succeeded';

if (calculationProcessCount === 0) {
// When the calculation is stopped and then a successful calculation is triggered, the value is -1
if (calculationProcessCount === 0 || calculationProcessCount === -1) {
result += `. Total time consumed: ${performance.now() - this._startExecutionTime} ms`;
}

Expand All @@ -378,7 +379,8 @@ export class TriggerCalculationController extends Disposable {
break;
}

if (calculationProcessCount === 0) {
// When the calculation is stopped and then a successful calculation is triggered, the value is -1
if (calculationProcessCount === 0 || calculationProcessCount === -1) {
if (startDependencyTimer) {
// The total calculation time does not exceed 1s, and the progress bar is not displayed.
clearTimeout(startDependencyTimer);
Expand All @@ -389,6 +391,7 @@ export class TriggerCalculationController extends Disposable {
this._completeProgress();
}

calculationProcessCount = 0;
this._doneCalculationTaskCount = 0;
this._totalCalculationTaskCount = 0;
this._forceCalculating = false;
Expand Down

0 comments on commit eef03a1

Please sign in to comment.