File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
libnavui-voice/src/main/java/com/mapbox/navigation/ui/voice/api Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import kotlinx.coroutines.flow.filter
2727import kotlinx.coroutines.flow.first
2828import kotlinx.coroutines.flow.flatMapConcat
2929import kotlinx.coroutines.flow.flatMapLatest
30+ import kotlinx.coroutines.flow.flatMapMerge
3031import kotlinx.coroutines.flow.flowOf
3132import kotlinx.coroutines.flow.map
3233import kotlinx.coroutines.flow.updateAndGet
@@ -127,8 +128,8 @@ internal constructor(
127128 private fun audioGuidanceFlow (
128129 mapboxNavigation : MapboxNavigation
129130 ): Flow <MapboxAudioGuidanceState > {
130- return mapboxNavigation.audioGuidanceVoice().flatMapLatest { audioGuidance ->
131- var lastPlayedInstructions : VoiceInstructions ? = null
131+ var lastPlayedInstructions : VoiceInstructions ? = null
132+ return mapboxNavigation.audioGuidanceVoice().flatMapMerge { audioGuidance ->
132133 mutedStateFlow.flatMapLatest { isMuted ->
133134 val voiceInstructions = mapboxVoiceInstructions.voiceInstructions()
134135 .map { state ->
You can’t perform that action at this time.
0 commit comments