Change-Id: I94aefab87ff9e05819800c516a0f2979f5f89d76
@ -29,7 +29,6 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flattenConcat
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.withContext
@ -29,7 +29,7 @@ sealed interface SearchResultUiState {
*/
object EmptyQuery : SearchResultUiState
object LoadFailed: SearchResultUiState
object LoadFailed : SearchResultUiState
data class Success(
val topics: List<FollowableTopic> = emptyList(),
@ -126,7 +126,8 @@ internal fun SearchScreen(
when (uiState) {
SearchResultUiState.Loading,
SearchResultUiState.LoadFailed,
SearchResultUiState.EmptyQuery -> Unit
SearchResultUiState.EmptyQuery,
-> Unit
is SearchResultUiState.Success -> {
if (uiState.isEmpty()) {
EmptySearchResultBody(
@ -55,7 +55,7 @@ class SearchViewModelTest {
fun setup() {
viewModel = SearchViewModel(
getSearchContentsUseCase = getSearchContentsUseCase,
savedStateHandle = SavedStateHandle()
savedStateHandle = SavedStateHandle(),
)
}