blockbasti / just_another_workout_timer

A simple timer for your workouts, built with Flutter!
MIT License
130 stars 23 forks source link

Duplicated Sets/Exercises are not editable. #96

Closed sargon closed 2 years ago

sargon commented 2 years ago

Describe the bug A clear and concise description of what the bug is. Duplicating a set or a exercise inside the builder generates none editable entries in the workout. But those duplicates sets or exercises are part of a workout run.

To Reproduce Steps to reproduce the behavior:

  1. Create a workout.
  2. Create a exercise of some length X.
  3. Click on 'duplicate for that exercise'
  4. Duplicates exercise is not part of the editable entries.
  5. Save workout
  6. See workout is 2xX long
  7. Play workout and see that workout contains 2 exercises.

Expected behavior Duplicated exercises or sets should be editable.

Smartphone (please complete the following information):

Additional context In https://github.com/blockbasti/just_another_workout_timer/blob/d868beed8f7ac666b37a79d6244932577501dd2f/lib/workout_builder.dart#L62 and https://github.com/blockbasti/just_another_workout_timer/blob/d868beed8f7ac666b37a79d6244932577501dd2f/lib/workout_builder.dart#L52 the sets or exercises are duplicated but the identifier is not modified, you can see this in an exported workout, changing the identifiers and reimport the workout makes the entries editable - would have created a pr but my flutter/dart is kind of not existent.

sargon commented 2 years ago

Thank you for the quick reaction. :-)