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
27
27
import kotlinx.coroutines.flow.first
28
28
import kotlinx.coroutines.flow.flatMapConcat
29
29
import kotlinx.coroutines.flow.flatMapLatest
30
+ import kotlinx.coroutines.flow.flatMapMerge
30
31
import kotlinx.coroutines.flow.flowOf
31
32
import kotlinx.coroutines.flow.map
32
33
import kotlinx.coroutines.flow.updateAndGet
@@ -127,8 +128,8 @@ internal constructor(
127
128
private fun audioGuidanceFlow (
128
129
mapboxNavigation : MapboxNavigation
129
130
): Flow <MapboxAudioGuidanceState > {
130
- return mapboxNavigation.audioGuidanceVoice().flatMapLatest { audioGuidance ->
131
- var lastPlayedInstructions : VoiceInstructions ? = null
131
+ var lastPlayedInstructions : VoiceInstructions ? = null
132
+ return mapboxNavigation.audioGuidanceVoice().flatMapMerge { audioGuidance ->
132
133
mutedStateFlow.flatMapLatest { isMuted ->
133
134
val voiceInstructions = mapboxVoiceInstructions.voiceInstructions()
134
135
.map { state ->
You can’t perform that action at this time.
0 commit comments