Fix format issues

Change-Id: I94aefab87ff9e05819800c516a0f2979f5f89d76
recent_search
thagikura 2 years ago
parent 37d4b65325
commit 55483e82df

@ -29,7 +29,6 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flattenConcat
import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapLatest import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext

@ -29,7 +29,7 @@ sealed interface SearchResultUiState {
*/ */
object EmptyQuery : SearchResultUiState object EmptyQuery : SearchResultUiState
object LoadFailed: SearchResultUiState object LoadFailed : SearchResultUiState
data class Success( data class Success(
val topics: List<FollowableTopic> = emptyList(), val topics: List<FollowableTopic> = emptyList(),

@ -126,7 +126,8 @@ internal fun SearchScreen(
when (uiState) { when (uiState) {
SearchResultUiState.Loading, SearchResultUiState.Loading,
SearchResultUiState.LoadFailed, SearchResultUiState.LoadFailed,
SearchResultUiState.EmptyQuery -> Unit SearchResultUiState.EmptyQuery,
-> Unit
is SearchResultUiState.Success -> { is SearchResultUiState.Success -> {
if (uiState.isEmpty()) { if (uiState.isEmpty()) {
EmptySearchResultBody( EmptySearchResultBody(

@ -55,7 +55,7 @@ class SearchViewModelTest {
fun setup() { fun setup() {
viewModel = SearchViewModel( viewModel = SearchViewModel(
getSearchContentsUseCase = getSearchContentsUseCase, getSearchContentsUseCase = getSearchContentsUseCase,
savedStateHandle = SavedStateHandle() savedStateHandle = SavedStateHandle(),
) )
} }

Loading…
Cancel
Save