diff --git a/modules/common-ui-components-workout-editor/src/main/java/com/ankitsuda/rebound/ui/components/workouteditor/WorkoutExerciseItem.kt b/modules/common-ui-components-workout-editor/src/main/java/com/ankitsuda/rebound/ui/components/workouteditor/WorkoutExerciseItem.kt index eb836f3e..505ac746 100644 --- a/modules/common-ui-components-workout-editor/src/main/java/com/ankitsuda/rebound/ui/components/workouteditor/WorkoutExerciseItem.kt +++ b/modules/common-ui-components-workout-editor/src/main/java/com/ankitsuda/rebound/ui/components/workouteditor/WorkoutExerciseItem.kt @@ -294,9 +294,9 @@ fun LazyListScope.workoutExerciseItemAlt( val revisedSetsTexts = getRevisedSetNumbers() items(items = sortedEntries, key = { - "${it.entryId}_${it.rpe}" +// "${it.entryId}_${it.rpe}" // "${it.entryId}_${it.setNumber}" -// it.entryId + it.entryId }) { entry -> SetItem( useReboundKeyboard = useReboundKeyboard, @@ -339,7 +339,7 @@ fun LazyListScope.workoutExerciseItemAlt( } } -@OptIn(ExperimentalMaterialApi::class, ExperimentalFoundationApi::class) +@OptIn(ExperimentalFoundationApi::class) @Composable private fun LazyItemScope.SetItem( exercise: Exercise, @@ -354,6 +354,14 @@ private fun LazyItemScope.SetItem( mutableStateOf(exerciseLogEntry) } + LaunchedEffect(key1 = exerciseLogEntry) { + // We have to change saved rpe manually because + // main rpe change is not handled by SetItem function + if (exerciseLogEntry.rpe != mLogEntry.rpe) { + mLogEntry = mLogEntry.copy(rpe = exerciseLogEntry.rpe) + } + } + val completionAnimDuration = 200 val completionAnimSpecFloat = tween( diff --git a/modules/common-ui-resources/src/main/res/values/strings.xml b/modules/common-ui-resources/src/main/res/values/strings.xml index 930ab0ec..3adaa110 100644 --- a/modules/common-ui-resources/src/main/res/values/strings.xml +++ b/modules/common-ui-resources/src/main/res/values/strings.xml @@ -223,9 +223,9 @@ Very Hard Effort Could have maybe done 2 more reps Extremely Hard Effort - Could have definitely done 1 more reps + Could have definitely done 1 more rep Extremely Hard Effort - Could have maybe done 1 more reps + Could have maybe done 1 more rep Max Effort No more reps possible \ No newline at end of file