fix: observe player progress also when in pause state
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ internal class PlaybackRepositoryImpl(
|
|||||||
|
|
||||||
@OptIn(ExperimentalCoroutinesApi::class)
|
@OptIn(ExperimentalCoroutinesApi::class)
|
||||||
private val currentPosition: Flow<Duration> = playbackState.flatMapLatest { state ->
|
private val currentPosition: Flow<Duration> = playbackState.flatMapLatest { state ->
|
||||||
if (state == PlaybackState.PLAYING) {
|
if (state in listOf(PlaybackState.PLAYING, PlaybackState.PAUSED)) {
|
||||||
flow {
|
flow {
|
||||||
while (true) {
|
while (true) {
|
||||||
emit(audioPlayer.currentPosition)
|
emit(audioPlayer.currentPosition)
|
||||||
|
|||||||
Reference in New Issue
Block a user