Skip to content

Commit

Permalink
Fix exercise names not shown
Browse files Browse the repository at this point in the history
  • Loading branch information
a-mabe committed Mar 22, 2024
1 parent 30fd447 commit 38398ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/start_workout/workout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ class CountDownTimerState extends State<CountDownTimer>
case 'warmup':
return "Warm-up";
case 'work':
String exercise = workoutArgument.numExercises == exercises.length
? exercises[interval]
: "Work";
String exercise = exercises.isNotEmpty ? exercises[interval] : "Work";
flipCurrentWorkInterval = true;
return exercise;
case 'rest':
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ List<ListTileModel> listItems(List exercises, Workout workoutArg) {
if (workoutArg.workTime > 0) {
listItems.add(
ListTileModel(
action: "Work",
action: exercises.isNotEmpty ? exercises[interval - 1] : "Work",
showMinutes: workoutArg.showMinutes,
interval: interval,
total: workoutArg.numExercises,
Expand Down

0 comments on commit 38398ef

Please sign in to comment.