diff --git a/common/compose/src/main/kotlin/team/duckie/app/android/common/compose/ui/ProfileOverlayView.kt b/common/compose/src/main/kotlin/team/duckie/app/android/common/compose/ui/ProfileOverlayView.kt index ee7f0a3ad..ea38fb848 100644 --- a/common/compose/src/main/kotlin/team/duckie/app/android/common/compose/ui/ProfileOverlayView.kt +++ b/common/compose/src/main/kotlin/team/duckie/app/android/common/compose/ui/ProfileOverlayView.kt @@ -17,13 +17,16 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp import team.duckie.app.android.common.compose.ui.quack.QuackProfileImage +import team.duckie.app.android.common.kotlin.fastForEach import team.duckie.quackquack.material.QuackColor +private const val PROFILE_OVERLAY_WIDTH = -5 + /** 프로필 중첩 View */ @Composable fun ProfileOverlayView(profileThumbnailUrls: List) { - Row(horizontalArrangement = Arrangement.spacedBy((-5).dp)) { - profileThumbnailUrls.forEach { url -> + Row(horizontalArrangement = Arrangement.spacedBy(PROFILE_OVERLAY_WIDTH.dp)) { + profileThumbnailUrls.fastForEach { url -> // 프로필 이미지 QuackProfileImage( modifier = Modifier diff --git a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/common/DetailContent.kt b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/common/DetailContent.kt index 997acfca7..5e4c0adf9 100644 --- a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/common/DetailContent.kt +++ b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/common/DetailContent.kt @@ -46,15 +46,13 @@ import team.duckie.quackquack.ui.QuackText import team.duckie.quackquack.ui.util.ExperimentalQuackQuackApi /** 상세 화면 컨텐츠 Layout */ -@Suppress("MagicNumber") +@Suppress("MagicNumber", "unused") @Composable internal fun DetailContentLayout( modifier: Modifier = Modifier, state: DetailState.Success, tagItemClick: (String) -> Unit, moreButtonClick: () -> Unit, - followButtonClick: () -> Unit, - profileClick: (Int) -> Unit, additionalInfo: (@Composable () -> Unit), ) { Column( diff --git a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/common/DetailProfileSection.kt b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/common/DetailProfileSection.kt index fc2930a8b..fd099c91d 100644 --- a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/common/DetailProfileSection.kt +++ b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/common/DetailProfileSection.kt @@ -36,7 +36,7 @@ import team.duckie.quackquack.ui.sugar.QuackTitle2 fun DetailProfileSection( state: DetailState.Success, followButtonClick: () -> Unit, - profileClick: (Int) -> Unit + profileClick: (Int) -> Unit, ) { // 구분선 QuackMaxWidthDivider() diff --git a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/exam/ExamDetailScreen.kt b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/exam/ExamDetailScreen.kt index 2b0bb87be..b2ae11612 100644 --- a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/exam/ExamDetailScreen.kt +++ b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/exam/ExamDetailScreen.kt @@ -47,8 +47,6 @@ internal fun ExamDetailContentLayout( state = state, tagItemClick = tagItemClick, moreButtonClick = moreButtonClick, - followButtonClick = followButtonClick, - profileClick = profileClick, additionalInfo = { DetailProfileSection(state, followButtonClick, profileClick) diff --git a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/funding/FundingDetailScreen.kt b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/funding/FundingDetailScreen.kt index 8cbdc4c39..66d6de01b 100644 --- a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/funding/FundingDetailScreen.kt +++ b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/funding/FundingDetailScreen.kt @@ -61,8 +61,6 @@ internal fun FundingDetailContentLayout( state = state, tagItemClick = tagItemClick, moreButtonClick = moreButtonClick, - followButtonClick = followButtonClick, - profileClick = profileClick, additionalInfo = { // 펀딩 카운트 정보 Section FundingCounterInfoSection(state) @@ -254,7 +252,7 @@ private fun FundingPreviewSection(state: DetailState.Success) { stringResource( id = R.string.detail_funding_preview_sample_title, state.exam.sampleQuestion?.text ?: "문제", - ) + ), ) (state.exam.sampleQuestion as? Question.Image)?.imageUrl?.let { diff --git a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/quiz/QuizDetailScreen.kt b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/quiz/QuizDetailScreen.kt index 5a5ca307f..2595b25d1 100644 --- a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/quiz/QuizDetailScreen.kt +++ b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/screen/quiz/QuizDetailScreen.kt @@ -70,8 +70,6 @@ internal fun QuizDetailContentLayout( state = state, tagItemClick = tagItemClick, moreButtonClick = moreButtonClick, - followButtonClick = followButtonClick, - profileClick = profileClick, additionalInfo = { DetailProfileSection(state, followButtonClick, profileClick) diff --git a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/viewmodel/DetailViewModel.kt b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/viewmodel/DetailViewModel.kt index 4db98e0ef..46fa13f9f 100644 --- a/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/viewmodel/DetailViewModel.kt +++ b/feature/detail/src/main/kotlin/team/duckie/app/android/feature/detail/viewmodel/DetailViewModel.kt @@ -94,8 +94,9 @@ class DetailViewModel @Inject constructor( exam = exam, appUser = me, isFollowing = exam.user?.follow != null, - examStatus = examStatus ?: (ExamStatus.from(exam.status ?: "") - ?: ExamStatus.Ready), + examStatus = examStatus ?: ( + ExamStatus.from(exam.status ?: "") ?: ExamStatus.Ready + ), ) } else { DetailState.Error(DuckieResponseFieldNPE("exam or me is Null"))