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

Commit 65e41c3b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11292102 from f8af6130 to 24Q2-release

Change-Id: I396ad70b6e7337199adb7d916f2726562fa268d2
parents d0176dfe f8af6130
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.flow.mapNotNull
@@ -65,6 +66,10 @@ class ClockCarouselViewModel(
                    ClockCarouselItemViewModel(it.clockId, it.isSelected, contentDescription)
                }
            }
            // makes sure that the operations above this statement are executed on I/O dispatcher
            // while parallelism limits the number of threads this can run on which makes sure that
            // the flows run sequentially
            .flowOn(backgroundDispatcher.limitedParallelism(1))
            .stateIn(viewModelScope, SharingStarted.Eagerly, emptyList())

    val selectedClockSize: Flow<ClockSize> = interactor.selectedClockSize