From 953288a0cdd09be881f94bc2edfa368693922c00 Mon Sep 17 00:00:00 2001 From: dean Date: Sun, 27 Aug 2023 16:06:02 +0900 Subject: [PATCH] =?UTF-8?q?#232=20Speaker=20=ED=95=9C=20=EB=AA=85=EB=A7=8C?= =?UTF-8?q?=20=EC=82=AC=EC=9A=A9=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feature/session/SessionDetailScreen.kt | 66 ++++++++----------- 1 file changed, 27 insertions(+), 39 deletions(-) diff --git a/feature/session/src/main/java/com/droidknights/app2023/feature/session/SessionDetailScreen.kt b/feature/session/src/main/java/com/droidknights/app2023/feature/session/SessionDetailScreen.kt index 549e84af..3bbf2125 100644 --- a/feature/session/src/main/java/com/droidknights/app2023/feature/session/SessionDetailScreen.kt +++ b/feature/session/src/main/java/com/droidknights/app2023/feature/session/SessionDetailScreen.kt @@ -121,7 +121,7 @@ private fun SessionDetailContent(session: Session) { Divider(thickness = 1.dp, color = MaterialTheme.colorScheme.outline) Spacer(modifier = Modifier.height(40.dp)) - SessionDetailSpeaker(session.speakers.toPersistentList()) + SessionDetailSpeaker(session.speakers.first()) } } @@ -168,40 +168,38 @@ private fun SessionDetailTitle( @Composable private fun SessionDetailSpeaker( - speakers: PersistentList, + speaker: Speaker, modifier: Modifier = Modifier, ) { Column(modifier = modifier) { - speakers.forEach { speaker -> - NetworkImage( - imageUrl = speaker.imageUrl, - modifier = Modifier - .size(108.dp) - .clip(CircleShape), - placeholder = painterResource(id = com.droidknights.app2023.core.ui.R.drawable.placeholder_speaker) - ) + NetworkImage( + imageUrl = speaker.imageUrl, + modifier = Modifier + .size(108.dp) + .clip(CircleShape), + placeholder = painterResource(id = com.droidknights.app2023.core.ui.R.drawable.placeholder_speaker) + ) - Spacer(Modifier.height(16.dp)) + Spacer(Modifier.height(16.dp)) - Text( - text = stringResource(id = R.string.session_detail_speaker), - style = KnightsTheme.typography.labelSmallM, - color = MaterialTheme.colorScheme.onSecondaryContainer, - ) - Text( - text = speaker.name, - style = KnightsTheme.typography.titleMediumB, - color = MaterialTheme.colorScheme.onSecondaryContainer, - ) + Text( + text = stringResource(id = R.string.session_detail_speaker), + style = KnightsTheme.typography.labelSmallM, + color = MaterialTheme.colorScheme.onSecondaryContainer, + ) + Text( + text = speaker.name, + style = KnightsTheme.typography.titleMediumB, + color = MaterialTheme.colorScheme.onSecondaryContainer, + ) - Spacer(Modifier.height(16.dp)) + Spacer(Modifier.height(16.dp)) - Text( - text = speaker.introduction, - style = KnightsTheme.typography.titleSmallR140, - color = MaterialTheme.colorScheme.onSecondaryContainer, - ) - } + Text( + text = speaker.introduction, + style = KnightsTheme.typography.titleSmallR140, + color = MaterialTheme.colorScheme.onSecondaryContainer, + ) } } @@ -224,11 +222,6 @@ private val SampleSessionHasContent = Session( introduction = "스피커1 에 대한 소개", imageUrl = "", ), - Speaker( - name = "스피커2", - introduction = "스피커2 에 대한 소개", - imageUrl = "", - ) ), level = Level.ADVANCED, tags = listOf(Tag("Dev Environment")), @@ -247,11 +240,6 @@ private val SampleSessionNoContent = Session( introduction = "스피커1 에 대한 소개", imageUrl = "", ), - Speaker( - name = "스피커2", - introduction = "스피커2 에 대한 소개", - imageUrl = "", - ) ), level = Level.ADVANCED, tags = listOf(Tag("Dev Environment")), @@ -297,7 +285,7 @@ private fun SessionDetailTitlePreview() { @Composable private fun SessionDetailSpeakerPreview() { KnightsTheme { - SessionDetailSpeaker(SampleSessionHasContent.speakers.toPersistentList()) + SessionDetailSpeaker(SampleSessionHasContent.speakers.first()) } }