Skip to content

Commit

Permalink
fix compute time to end of workout
Browse files Browse the repository at this point in the history
  • Loading branch information
andorsk committed May 8, 2024
1 parent 0de6af0 commit 6e5ac81
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/workout/WorkoutManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,17 @@ export class WorkoutManager implements WorkoutManagerI {
}

this._timeFromBeginningOfSet = computeTotalTimeFromSteps(
this.workout.steps.slice(this._currentStep, this.workout.steps.length),
this.workout.steps.slice(
this._currentStep + 1,
this.workout.steps.length,
),
);

this._timeLeft = this._timeFromBeginningOfSet;
this._timeLeft =
this._timeFromBeginningOfSet -
(this._timer.totalTime - this._timer.remainingTime);

// this._timeLeft = this._timeFromBeginningOfSet;
this._playedThreeSecondSound = false;
await this.refresh();
}
Expand Down

0 comments on commit 6e5ac81

Please sign in to comment.