Skip to content

Commit 303bd14

Browse files
authored
Merge pull request #67 from Nexters/dev
1.0.4 dev 브랜치를 main에 머지합니다.
2 parents 19112b5 + 7043354 commit 303bd14

File tree

17 files changed

+209
-105
lines changed

17 files changed

+209
-105
lines changed

build-logic/convention/src/main/kotlin/com/plottwist/tuk/Extension.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ fun ApplicationExtension.configureDefaultConfig() {
1111
defaultConfig {
1212
applicationId = "com.plottwist.tuk"
1313
targetSdk = 36
14-
versionCode = 8
15-
versionName = "1.0.3"
14+
versionCode = 10
15+
versionName = "1.0.4"
1616

1717
vectorDrawables {
1818
useSupportLibrary = true

core/data/src/main/java/com/plottwist/core/data/mapper/Gathering.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,17 @@ fun GatheringDetailData.toDomainModel() : GatheringDetail {
3838
gatheringIntervalDays = this.gatheringIntervalDays,
3939
sentProposalCount = this.sentProposalCount,
4040
receivedProposalCount = this.receivedProposalCount,
41-
members = this.members.map { it.toDomainModel() }
41+
members = this.members.map { it.toDomainModel() },
42+
isHost = this.isHost
4243
)
4344
}
4445

4546
fun GatheringMemberData.toDomainModel() : GatheringMember {
4647
return GatheringMember(
4748
memberId = this.memberId,
48-
memberName = this.memberName
49+
memberName = this.memberName,
50+
isHost = this.isHost,
51+
isMe = this.isMe
4952
)
5053
}
5154

544 Bytes
Loading
19.6 KB
Loading
364 KB
Loading

core/designsystem/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<string name="home_bottom_sheet_stop_text">멈추기</string>
77
<string name="home_bottom_create_gathering_description">모임을 생성하고\n넌지시 만남을 제안해 보세요</string>
88
<string name="home_bottom_create_gathering_button_text">모임 생성하기</string>
9-
<string name="home_last_alarm">마지막 알람</string>
9+
<string name="home_last_alarm">마지막 연락</string>
1010
<string name="home_random_proposal_description_prefix">말이 안되는거 알지만\n\n\n우리,</string>
1111
<string name="home_random_proposal_description_suffix">어때</string>
1212
<string name="home_proposals">받은 초대장</string>

core/domain/src/main/java/com/plottwist/core/domain/model/Gathering.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ data class GatheringDetail(
1818
val gatheringIntervalDays: Long = 0,
1919
val sentProposalCount: Int = 0,
2020
val receivedProposalCount: Int = 0,
21-
val members: List<GatheringMember> = emptyList()
21+
val members: List<GatheringMember> = emptyList(),
22+
val isHost: Boolean = false
2223
)
2324

2425
data class GatheringMember(
2526
val memberId: Long = 0,
26-
val memberName: String = ""
27+
val memberName: String = "",
28+
val isHost: Boolean = false,
29+
val isMe: Boolean = false
2730
)
2831

2932
data class Purposes(

core/network/src/main/java/com/plottwist/core/network/model/gathering/GatheringDetailResponse.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@ data class GatheringDetailData(
1919
val gatheringIntervalDays: Long,
2020
val sentProposalCount: Int,
2121
val receivedProposalCount: Int,
22-
val members: List<GatheringMemberData>
22+
val members: List<GatheringMemberData>,
23+
val isHost: Boolean
2324
)
2425

2526
@Serializable
2627
data class GatheringMemberData(
2728
val memberId: Long,
28-
val memberName: String
29+
val memberName: String,
30+
val isHost: Boolean,
31+
val isMe: Boolean
2932
)

core/push/src/main/java/com/plottwist/core/push/TukFirebaseMessagingService.kt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.plottwist.core.push
22

33
import android.app.PendingIntent
44
import android.content.Intent
5+
import com.google.firebase.messaging.Constants
56
import com.google.firebase.messaging.FirebaseMessagingService
67
import com.google.firebase.messaging.RemoteMessage
78
import com.plottwist.core.notification.TukNotificationManager
@@ -15,20 +16,16 @@ class TukFirebaseMessagingService : FirebaseMessagingService() {
1516
@Inject
1617
lateinit var tukNotificationManager: TukNotificationManager
1718

18-
1919
override fun onNewToken(token: String) {
2020
super.onNewToken(token)
2121
}
2222

2323
override fun onMessageReceived(message: RemoteMessage) {
2424
super.onMessageReceived(message)
25-
26-
message.notification?.let { notificationMessage ->
27-
val title = notificationMessage.title ?: TukNotificationManager.DEFAULT_TITLE
28-
val description = notificationMessage.body ?: TukNotificationManager.DEFAULT_DESCRIPTION
29-
val deeplink = message.data.get("deepLink") ?: ""
30-
sendNotification(title, description, deeplink)
31-
}
25+
val title = message.data.get("title") ?: ""
26+
val description = message.data.get("body") ?: ""
27+
val deeplink = message.data.get("deepLink") ?: ""
28+
sendNotification(title, description, deeplink)
3229
}
3330

3431
private fun sendNotification(title: String, description: String, deeplink: String) {
@@ -52,4 +49,17 @@ class TukFirebaseMessagingService : FirebaseMessagingService() {
5249
)
5350
)
5451
}
52+
53+
54+
override fun handleIntent(intent: Intent?) {
55+
val newIntent = intent?.apply {
56+
val newExtras = extras?.apply {
57+
remove(Constants.MessageNotificationKeys.ENABLE_NOTIFICATION)
58+
remove("gcm.notification.e")
59+
}
60+
replaceExtras(newExtras)
61+
}
62+
super.handleIntent(newIntent)
63+
64+
}
5565
}

feature/gathering-detail/src/main/java/com/plottwist/feature/gathering_detail/GatheringDetailScreen.kt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ import androidx.compose.foundation.layout.Arrangement
66
import androidx.compose.foundation.layout.Column
77
import androidx.compose.foundation.layout.PaddingValues
88
import androidx.compose.foundation.layout.Row
9+
import androidx.compose.foundation.layout.Spacer
910
import androidx.compose.foundation.layout.fillMaxSize
1011
import androidx.compose.foundation.layout.fillMaxWidth
12+
import androidx.compose.foundation.layout.height
1113
import androidx.compose.foundation.layout.padding
1214
import androidx.compose.foundation.layout.width
1315
import androidx.compose.foundation.lazy.LazyColumn
@@ -82,6 +84,7 @@ fun GatheringDetailScreen(
8284
lastAlarm = state.gatheringDetail.lastPushRelativeTime,
8385
sentProposalCount = state.gatheringDetail.sentProposalCount,
8486
receivedProposalCount = state.gatheringDetail.receivedProposalCount,
87+
isHost = state.gatheringDetail.isHost,
8588
onAlarmSettingClick = {
8689
viewModel.handleAction(GatheringDetailAction.ClickAlarmSetting)
8790
},
@@ -110,6 +113,7 @@ private fun GatheringDetailScreen(
110113
lastAlarm: String,
111114
sentProposalCount: Int,
112115
receivedProposalCount: Int,
116+
isHost: Boolean,
113117
onAlarmSettingClick: () -> Unit,
114118
onProposalClick: () -> Unit,
115119
onSentProposalClick: () -> Unit,
@@ -138,10 +142,14 @@ private fun GatheringDetailScreen(
138142
}
139143

140144
item(key = Items.ALARM_SETTING) {
141-
GatheringAlarmSetting(
142-
modifier = Modifier.padding(top = 24.dp),
143-
onClick = onAlarmSettingClick
144-
)
145+
if(isHost) {
146+
GatheringAlarmSetting(
147+
modifier = Modifier.padding(top = 24.dp),
148+
onClick = onAlarmSettingClick
149+
)
150+
} else {
151+
Spacer(modifier = Modifier.fillMaxWidth().height(44.dp))
152+
}
145153
}
146154

147155
item(key = Items.GATHERING_INFO) {
@@ -243,6 +251,7 @@ private fun GatheringDetailScreenPreview() {
243251
lastAlarm = "3달 전",
244252
sentProposalCount = 99,
245253
receivedProposalCount = 99,
254+
isHost = true,
246255
onAlarmSettingClick = {},
247256
onProposalClick = {},
248257
onSentProposalClick = {},

0 commit comments

Comments
 (0)