Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87365831 authored by Anton Potapov's avatar Anton Potapov Committed by Android (Google) Code Review
Browse files

Merge "Add conflate to the sudio tream flow so it doesn't get overwhelmed by...

Merge "Add conflate to the sudio tream flow so it doesn't get overwhelmed by the old changes" into main
parents ca1943b2 dbee5952
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -34,6 +34,7 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.callbackFlow
import kotlinx.coroutines.flow.callbackFlow
import kotlinx.coroutines.flow.conflate
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filterIsInstance
import kotlinx.coroutines.flow.filterIsInstance
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.filterNotNull
@@ -134,6 +135,7 @@ class AudioRepositoryImpl(
            }
            }
            .map { getCurrentAudioStream(audioStream) }
            .map { getCurrentAudioStream(audioStream) }
            .onStart { emit(getCurrentAudioStream(audioStream)) }
            .onStart { emit(getCurrentAudioStream(audioStream)) }
            .conflate()
            .flowOn(backgroundCoroutineContext)
            .flowOn(backgroundCoroutineContext)
    }
    }