Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Remove exercise on remove last set
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkitSuda committed Nov 19, 2022
1 parent ba9cbf8 commit 5d175e1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ fun WorkoutEditorComponent(
onUpdateLogEntry(updatedEntry)
},
onSwipeDelete = { entryToDelete ->
onDeleteLogEntry(entryToDelete)
if (logEntriesWithJunctionItem.logEntries.size == 1) {
onDeleteExerciseFromWorkout(logEntriesWithJunctionItem)
} else {
onDeleteLogEntry(entryToDelete)
}
},
onAddSet = {
onAddEmptySetToExercise(
Expand Down

0 comments on commit 5d175e1

Please sign in to comment.