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

Commit

Permalink
Fix workout not finish even with valid sets
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkitSuda committed Nov 30, 2022
1 parent 3aefd1c commit 6fb13a0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,14 @@ class WorkoutPanelViewModel @Inject constructor(
}
}

private suspend fun checkIfAllSetsAreComplete(): Boolean {
private fun checkIfAllSetsAreComplete(): Boolean {
val junctions = _logEntriesWithExerciseJunction.value

if (junctions.isEmpty()) return false

for (junction in junctions) {
val isIncomplete = junction.logEntries.any {
WorkoutEditorUtils.isValidSet(it, junction.exercise.category)
!WorkoutEditorUtils.isValidSet(it, junction.exercise.category)
}

if (isIncomplete) {
Expand Down

0 comments on commit 6fb13a0

Please sign in to comment.