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

Commit 4f97b901 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move media recommendations observer registeration binder to background" into main

parents a8f8f66a 487c8e94
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.launch
@@ -371,6 +372,7 @@ class MediaDataProcessor(
            .onStart { emit(Unit) }
            .map { allowMediaRecommendations() }
            .distinctUntilChanged()
            .flowOn(backgroundDispatcher)
            // only track the most recent emission
            .collectLatest {
                allowMediaRecommendations = it