diff --git a/feature/search/src/main/java/team/ppac/search/detail/SearchDetailScreen.kt b/feature/search/src/main/java/team/ppac/search/detail/SearchDetailScreen.kt index 137dd4a4..9a46366c 100644 --- a/feature/search/src/main/java/team/ppac/search/detail/SearchDetailScreen.kt +++ b/feature/search/src/main/java/team/ppac/search/detail/SearchDetailScreen.kt @@ -22,7 +22,6 @@ import team.ppac.designsystem.component.toolbar.FarmemeBackToolBar import team.ppac.search.detail.component.EmptyResultContent import team.ppac.search.detail.component.SearchDetailLoadingContent import team.ppac.search.detail.component.SearchDetailResultContent -import team.ppac.search.detail.component.SearchDetailResultHeader import team.ppac.search.detail.mvi.SearchDetailUiState @Composable @@ -85,8 +84,8 @@ internal fun SearchDetailScreen( if (uiState.totalMemeCount == 0) { EmptyResultContent() } else { - SearchDetailResultHeader(totalCount = uiState.totalMemeCount) SearchDetailResultContent( + totalItemCount = uiState.totalMemeCount, searchResults = searchResults, onMemeClick = onMemeClick, ) diff --git a/feature/search/src/main/java/team/ppac/search/detail/component/SearchDetailResultContent.kt b/feature/search/src/main/java/team/ppac/search/detail/component/SearchDetailResultContent.kt index 64a5a6d0..efa83473 100644 --- a/feature/search/src/main/java/team/ppac/search/detail/component/SearchDetailResultContent.kt +++ b/feature/search/src/main/java/team/ppac/search/detail/component/SearchDetailResultContent.kt @@ -1,6 +1,7 @@ package team.ppac.search.detail.component import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.offset import androidx.compose.foundation.lazy.staggeredgrid.LazyVerticalStaggeredGrid import androidx.compose.foundation.lazy.staggeredgrid.StaggeredGridCells import androidx.compose.foundation.lazy.staggeredgrid.StaggeredGridItemSpan @@ -16,6 +17,7 @@ import team.ppac.search.detail.model.SearchResultUiModel @Composable fun SearchDetailResultContent( modifier: Modifier = Modifier, + totalItemCount: Int, searchResults: LazyPagingItems, onMemeClick: (String) -> Unit, ) { @@ -25,6 +27,9 @@ fun SearchDetailResultContent( horizontalArrangement = Arrangement.spacedBy(space = 12.dp), verticalItemSpacing = 20.dp ) { + item(span = StaggeredGridItemSpan.FullLine) { + SearchDetailResultHeader(totalCount = totalItemCount) + } items( count = searchResults.itemCount, key = searchResults.itemKey(SearchResultUiModel::memeId) @@ -33,7 +38,7 @@ fun SearchDetailResultContent( with(searchResult) { FarmemeMemeItem( - modifier = Modifier, + modifier = Modifier.offset(y = (-20).dp), memeId = memeId, memeTitle = memeTitle, lolCount = lolCount,