From 3570f0663c25972d3273fd7e82316ecccb44bc3b Mon Sep 17 00:00:00 2001 From: eshc123 Date: Wed, 20 Aug 2025 20:05:17 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=EB=AA=A8=EC=9E=84=20=EC=83=81=EC=84=B8=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20Response=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/plottwist/core/data/mapper/Gathering.kt | 7 +++++-- .../main/java/com/plottwist/core/domain/model/Gathering.kt | 7 +++++-- .../network/model/gathering/GatheringDetailResponse.kt | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/core/data/src/main/java/com/plottwist/core/data/mapper/Gathering.kt b/core/data/src/main/java/com/plottwist/core/data/mapper/Gathering.kt index 0076902c..0be5bc6e 100644 --- a/core/data/src/main/java/com/plottwist/core/data/mapper/Gathering.kt +++ b/core/data/src/main/java/com/plottwist/core/data/mapper/Gathering.kt @@ -38,14 +38,17 @@ fun GatheringDetailData.toDomainModel() : GatheringDetail { gatheringIntervalDays = this.gatheringIntervalDays, sentProposalCount = this.sentProposalCount, receivedProposalCount = this.receivedProposalCount, - members = this.members.map { it.toDomainModel() } + members = this.members.map { it.toDomainModel() }, + isHost = this.isHost ) } fun GatheringMemberData.toDomainModel() : GatheringMember { return GatheringMember( memberId = this.memberId, - memberName = this.memberName + memberName = this.memberName, + isHost = this.isHost, + isMe = this.isMe ) } diff --git a/core/domain/src/main/java/com/plottwist/core/domain/model/Gathering.kt b/core/domain/src/main/java/com/plottwist/core/domain/model/Gathering.kt index 1dbbee30..49f53827 100644 --- a/core/domain/src/main/java/com/plottwist/core/domain/model/Gathering.kt +++ b/core/domain/src/main/java/com/plottwist/core/domain/model/Gathering.kt @@ -18,12 +18,15 @@ data class GatheringDetail( val gatheringIntervalDays: Long = 0, val sentProposalCount: Int = 0, val receivedProposalCount: Int = 0, - val members: List = emptyList() + val members: List = emptyList(), + val isHost: Boolean = false ) data class GatheringMember( val memberId: Long = 0, - val memberName: String = "" + val memberName: String = "", + val isHost: Boolean = false, + val isMe: Boolean = false ) data class Purposes( diff --git a/core/network/src/main/java/com/plottwist/core/network/model/gathering/GatheringDetailResponse.kt b/core/network/src/main/java/com/plottwist/core/network/model/gathering/GatheringDetailResponse.kt index b4157c41..fa4e8c08 100644 --- a/core/network/src/main/java/com/plottwist/core/network/model/gathering/GatheringDetailResponse.kt +++ b/core/network/src/main/java/com/plottwist/core/network/model/gathering/GatheringDetailResponse.kt @@ -19,11 +19,14 @@ data class GatheringDetailData( val gatheringIntervalDays: Long, val sentProposalCount: Int, val receivedProposalCount: Int, - val members: List + val members: List, + val isHost: Boolean ) @Serializable data class GatheringMemberData( val memberId: Long, - val memberName: String + val memberName: String, + val isHost: Boolean, + val isMe: Boolean ) From 9450f558b9e8c4d477992e90f6117cbd8ba4d423 Mon Sep 17 00:00:00 2001 From: eshc123 Date: Wed, 20 Aug 2025 20:08:17 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=EB=AA=A8=EC=9E=84=20=EC=83=81=EC=84=B8=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=9D=BC=20=EB=95=8C=20=EB=B0=A9=EC=9E=A5?= =?UTF-8?q?=EC=9D=BC=20=EB=95=8C=20=EB=AA=A8=EC=9E=84=20=EC=95=8C=EB=A6=BC?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95=20=EB=B3=B4=EC=9D=B4=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gathering_detail/GatheringDetailScreen.kt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/feature/gathering-detail/src/main/java/com/plottwist/feature/gathering_detail/GatheringDetailScreen.kt b/feature/gathering-detail/src/main/java/com/plottwist/feature/gathering_detail/GatheringDetailScreen.kt index cbeb5e80..7809e026 100644 --- a/feature/gathering-detail/src/main/java/com/plottwist/feature/gathering_detail/GatheringDetailScreen.kt +++ b/feature/gathering-detail/src/main/java/com/plottwist/feature/gathering_detail/GatheringDetailScreen.kt @@ -6,8 +6,10 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn @@ -82,6 +84,7 @@ fun GatheringDetailScreen( lastAlarm = state.gatheringDetail.lastPushRelativeTime, sentProposalCount = state.gatheringDetail.sentProposalCount, receivedProposalCount = state.gatheringDetail.receivedProposalCount, + isHost = state.gatheringDetail.isHost, onAlarmSettingClick = { viewModel.handleAction(GatheringDetailAction.ClickAlarmSetting) }, @@ -110,6 +113,7 @@ private fun GatheringDetailScreen( lastAlarm: String, sentProposalCount: Int, receivedProposalCount: Int, + isHost: Boolean, onAlarmSettingClick: () -> Unit, onProposalClick: () -> Unit, onSentProposalClick: () -> Unit, @@ -138,10 +142,14 @@ private fun GatheringDetailScreen( } item(key = Items.ALARM_SETTING) { - GatheringAlarmSetting( - modifier = Modifier.padding(top = 24.dp), - onClick = onAlarmSettingClick - ) + if(isHost) { + GatheringAlarmSetting( + modifier = Modifier.padding(top = 24.dp), + onClick = onAlarmSettingClick + ) + } else { + Spacer(modifier = Modifier.fillMaxWidth().height(44.dp)) + } } item(key = Items.GATHERING_INFO) { @@ -243,6 +251,7 @@ private fun GatheringDetailScreenPreview() { lastAlarm = "3달 전", sentProposalCount = 99, receivedProposalCount = 99, + isHost = true, onAlarmSettingClick = {}, onProposalClick = {}, onSentProposalClick = {}, From 1b5ef53a846642230cfd1bbd5ec6b4b4ed520da5 Mon Sep 17 00:00:00 2001 From: eshc123 Date: Wed, 20 Aug 2025 20:15:32 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=EB=AA=A8=EC=9E=84=20=EC=83=81=EC=84=B8=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=EC=97=90=EC=84=9C=20=EB=A9=A4=EB=B2=84=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=EC=97=90=20'=EB=82=98'=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/GatheringMembers.kt | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/feature/gathering-detail/src/main/java/com/plottwist/feature/gathering_detail/component/GatheringMembers.kt b/feature/gathering-detail/src/main/java/com/plottwist/feature/gathering_detail/component/GatheringMembers.kt index 2f6b46bc..d81a034d 100644 --- a/feature/gathering-detail/src/main/java/com/plottwist/feature/gathering_detail/component/GatheringMembers.kt +++ b/feature/gathering-detail/src/main/java/com/plottwist/feature/gathering_detail/component/GatheringMembers.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon @@ -22,7 +23,9 @@ import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp import com.plottwist.core.designsystem.R +import com.plottwist.core.designsystem.foundation.TukColorTokens.Gray300 import com.plottwist.core.designsystem.foundation.type.TukPretendardTypography import com.plottwist.core.designsystem.foundation.type.TukSerifTypography import com.plottwist.core.domain.model.GatheringMember @@ -59,15 +62,37 @@ fun GatheringMembers( ) members.forEach { member -> - Text( - text = member.memberName, - style = TukPretendardTypography.body16R, - color = Color(0xFF1f1f1f) - ) + Row( + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(5.dp) + ){ + Text( + text = member.memberName, + style = TukPretendardTypography.body16R, + color = Color(0xFF1f1f1f) + ) + if(member.isMe){ + MemberMarkAsMe() + } + } + } } } +@Composable +fun MemberMarkAsMe(modifier: Modifier = Modifier) { + Text( + modifier = modifier.background( + color = Gray300, + shape = CircleShape + ).padding(horizontal = 5.dp), + text = "나", + style = TukPretendardTypography.body12M.copy( + fontSize = 10.sp + ) + ) +} @Composable fun InvitationMemberText(