|
|
|
@ -12,6 +12,7 @@ import kotlinx.coroutines.flow.MutableStateFlow
|
|
|
|
import kotlinx.coroutines.flow.SharingStarted
|
|
|
|
import kotlinx.coroutines.flow.SharingStarted
|
|
|
|
import kotlinx.coroutines.flow.StateFlow
|
|
|
|
import kotlinx.coroutines.flow.StateFlow
|
|
|
|
import kotlinx.coroutines.flow.combine
|
|
|
|
import kotlinx.coroutines.flow.combine
|
|
|
|
|
|
|
|
import kotlinx.coroutines.flow.dropWhile
|
|
|
|
import kotlinx.coroutines.flow.stateIn
|
|
|
|
import kotlinx.coroutines.flow.stateIn
|
|
|
|
import kotlinx.coroutines.joinAll
|
|
|
|
import kotlinx.coroutines.joinAll
|
|
|
|
import kotlinx.coroutines.launch
|
|
|
|
import kotlinx.coroutines.launch
|
|
|
|
@ -67,7 +68,7 @@ class SearchViewModel @Inject constructor(
|
|
|
|
|
|
|
|
|
|
|
|
val list: StateFlow<List<ListModel>> = combine(
|
|
|
|
val list: StateFlow<List<ListModel>> = combine(
|
|
|
|
results,
|
|
|
|
results,
|
|
|
|
isLoading,
|
|
|
|
isLoading.dropWhile { !it },
|
|
|
|
includeDisabledSources,
|
|
|
|
includeDisabledSources,
|
|
|
|
) { list, loading, includeDisabled ->
|
|
|
|
) { list, loading, includeDisabled ->
|
|
|
|
when {
|
|
|
|
when {
|
|
|
|
|