File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
presentation/src/main/java/xyz/aprildown/timer/presentation/stream Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -721,13 +721,17 @@ private fun generateVoiceContent(
721721 VoiceAction .VOICE_VARIABLE_STEP_NAME ,
722722 VoiceAction .VARIABLE_STEP_NAME -> step.label
723723 VoiceAction .VOICE_VARIABLE_STEP_NAME_NEXT -> {
724- timer.getStep(
725- getNextIndexWithStep(
726- steps = timer.steps,
727- totalLoop = timer.loop,
728- currentIndex = index,
729- ).first
730- )?.label.toString()
724+ if (index is TimerIndex .End ) {
725+ null
726+ } else {
727+ timer.getStep(
728+ getNextIndexWithStep(
729+ steps = timer.steps,
730+ totalLoop = timer.loop,
731+ currentIndex = index,
732+ ).first
733+ )
734+ }?.label.toString()
731735 }
732736 VoiceAction .VOICE_VARIABLE_STEP_DURATION ,
733737 VoiceAction .VARIABLE_STEP_DURATION -> timeFormatter.formatDuration(step.length)
You can’t perform that action at this time.
0 commit comments