Compare commits
2 Commits
f75dfc706a
...
5d98419ef2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d98419ef2 | ||
|
|
b52ddb5c4d |
@@ -392,10 +392,13 @@ class PresetViewModel @Inject constructor(
|
|||||||
val newRepetitionIndex = repetitionList.value.indexOf(repetition).takeIf { it != -1 } ?: 0
|
val newRepetitionIndex = repetitionList.value.indexOf(repetition).takeIf { it != -1 } ?: 0
|
||||||
val newRepetition = if (isUp == UpDownState.Up) {
|
val newRepetition = if (isUp == UpDownState.Up) {
|
||||||
// Original logic: repetitionIndex < PulseDurations.size -1 (Likely a typo, should be Repetitions.size)
|
// Original logic: repetitionIndex < PulseDurations.size -1 (Likely a typo, should be Repetitions.size)
|
||||||
if (newRepetitionIndex < repetitionList.value.size - 1) repetitionList.value[newRepetitionIndex + 1] else repetition
|
if(newRepetitionIndex < repetitionList.value.size - 1) repetitionList.value[newRepetitionIndex + 1]
|
||||||
} else {
|
else repetition
|
||||||
|
}
|
||||||
|
else {
|
||||||
// Original logic: repetitionIndex > 1
|
// Original logic: repetitionIndex > 1
|
||||||
if (newRepetitionIndex > 0) repetitionList.value[newRepetitionIndex - 1] else repetition
|
if (newRepetitionIndex > 0) repetitionList.value[newRepetitionIndex - 1]
|
||||||
|
else repetition
|
||||||
}
|
}
|
||||||
|
|
||||||
val updatedPreset = currentList[index].copy(repetition = newRepetition)
|
val updatedPreset = currentList[index].copy(repetition = newRepetition)
|
||||||
|
|||||||
Reference in New Issue
Block a user