From 55483e82dfecf80318816e83d0ec3c6abfd7b73b Mon Sep 17 00:00:00 2001 From: thagikura Date: Mon, 17 Apr 2023 22:06:21 +0900 Subject: [PATCH] Fix format issues Change-Id: I94aefab87ff9e05819800c516a0f2979f5f89d76 --- .../core/data/repository/DefaultSearchContentsRepository.kt | 1 - .../apps/nowinandroid/feature/search/SearchResultUiState.kt | 2 +- .../samples/apps/nowinandroid/feature/search/SearchScreen.kt | 3 ++- .../apps/nowinandroid/feature/search/SearchViewModelTest.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/data/src/main/java/com/google/samples/apps/nowinandroid/core/data/repository/DefaultSearchContentsRepository.kt b/core/data/src/main/java/com/google/samples/apps/nowinandroid/core/data/repository/DefaultSearchContentsRepository.kt index 37f744ce1..0bc7ceadb 100644 --- a/core/data/src/main/java/com/google/samples/apps/nowinandroid/core/data/repository/DefaultSearchContentsRepository.kt +++ b/core/data/src/main/java/com/google/samples/apps/nowinandroid/core/data/repository/DefaultSearchContentsRepository.kt @@ -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 diff --git a/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchResultUiState.kt b/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchResultUiState.kt index 617472281..14967fa5e 100644 --- a/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchResultUiState.kt +++ b/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchResultUiState.kt @@ -29,7 +29,7 @@ sealed interface SearchResultUiState { */ object EmptyQuery : SearchResultUiState - object LoadFailed: SearchResultUiState + object LoadFailed : SearchResultUiState data class Success( val topics: List = emptyList(), diff --git a/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchScreen.kt b/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchScreen.kt index 588beb7ae..39c0113e7 100644 --- a/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchScreen.kt +++ b/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchScreen.kt @@ -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( diff --git a/feature/search/src/test/java/com/google/samples/apps/nowinandroid/feature/search/SearchViewModelTest.kt b/feature/search/src/test/java/com/google/samples/apps/nowinandroid/feature/search/SearchViewModelTest.kt index cbd38b536..3ba78b629 100644 --- a/feature/search/src/test/java/com/google/samples/apps/nowinandroid/feature/search/SearchViewModelTest.kt +++ b/feature/search/src/test/java/com/google/samples/apps/nowinandroid/feature/search/SearchViewModelTest.kt @@ -55,7 +55,7 @@ class SearchViewModelTest { fun setup() { viewModel = SearchViewModel( getSearchContentsUseCase = getSearchContentsUseCase, - savedStateHandle = SavedStateHandle() + savedStateHandle = SavedStateHandle(), ) }