From fd0a2744823b50325141abf4ac5c14ff738535fe Mon Sep 17 00:00:00 2001 From: hyejin12-ju Date: Thu, 19 Sep 2024 17:51:46 +0900 Subject: [PATCH] =?UTF-8?q?[QA]=20=EC=8A=A4=EC=BC=88=EB=A0=88=ED=86=A4?= =?UTF-8?q?=EB=95=8C=20shape=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ppac/detail/component/DetailContent.kt | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/feature/detail/src/main/java/team/ppac/detail/component/DetailContent.kt b/feature/detail/src/main/java/team/ppac/detail/component/DetailContent.kt index 3277d4d0..03cc660d 100644 --- a/feature/detail/src/main/java/team/ppac/detail/component/DetailContent.kt +++ b/feature/detail/src/main/java/team/ppac/detail/component/DetailContent.kt @@ -15,9 +15,9 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width +import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.SideEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Alignment @@ -99,7 +99,8 @@ internal fun DetailContent( DetailFunnyButton( modifier = Modifier.mapTextSkeletonModifierIfNeed( isLoading = isLoading, - height = 46.dp + height = 46.dp, + shape = FarmemeRadius.Radius10.shape, ), reactionCount = uiModel.reactionCount, isReaction = uiModel.isReaction, @@ -127,9 +128,11 @@ private fun Modifier.mapImageSkeletonModifierIfNeed( private fun Modifier.mapTextSkeletonModifierIfNeed( isLoading: Boolean, - height: Dp + height: Dp, + shape: RoundedCornerShape, ): Modifier { return if (isLoading) Modifier + .clip(shape) .fillMaxWidth() .height(height) .showSkeleton(true) @@ -179,7 +182,11 @@ internal fun DetailHashTags( onHashTagsClick: () -> Unit, ) { Text( - modifier = Modifier.mapTextSkeletonModifierIfNeed(isLoading = isLoading, height = 30.dp), + modifier = Modifier.mapTextSkeletonModifierIfNeed( + isLoading = isLoading, + height = 30.dp, + shape = FarmemeRadius.Radius4.shape, + ), text = name.truncateDisplayedString(16), color = FarmemeTheme.textColor.primary, style = FarmemeTheme.typography.heading.large.semibold, @@ -187,7 +194,11 @@ internal fun DetailHashTags( ) Spacer(modifier = Modifier.height(5.dp)) DetailTags( - modifier = Modifier.mapTextSkeletonModifierIfNeed(isLoading = isLoading, height = 18.dp), + modifier = Modifier.mapTextSkeletonModifierIfNeed( + isLoading = isLoading, + height = 18.dp, + shape = FarmemeRadius.Radius4.shape, + ), hashTags = hashTags.truncateDisplayedList(6), onHashTagsClick = onHashTagsClick ) @@ -197,6 +208,7 @@ internal fun DetailHashTags( modifier = Modifier.mapTextSkeletonModifierIfNeed( isLoading = isLoading, height = 15.dp, + shape = FarmemeRadius.Radius4.shape ), text = "출처 : ${sourceDescription.truncateDisplayedString(32)}", color = FarmemeTheme.textColor.assistive, @@ -243,7 +255,7 @@ fun DetailFunnyButton( .rippleClickable( rippleColor = FarmemeTheme.skeletonColor.secondary, onClick = { - if(!isLoading) { + if (!isLoading) { coroutineScope.launch { lottieAnimatable.animate(composition = lottieComposition) }