Skip to content

Commit dfdadc2

Browse files
committed
[BOOK-504] feat: "기타"가 대표 감정일 경우 "여러 감정을 느꼈어요"로 표기되게 수정
1 parent ef95096 commit dfdadc2

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

feature/detail/src/main/kotlin/com/ninecraft/booket/feature/detail/book/component/CollectedSeeds.kt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,13 @@ private fun CollectedSeedsHeader(
147147
Row(
148148
verticalAlignment = Alignment.CenterVertically,
149149
) {
150+
val emotionDisplayName = if (primaryEmotion.code == EmotionCode.OTHER) {
151+
stringResource(R.string.collected_seed_other_emotion_name)
152+
} else {
153+
primaryEmotion.code.displayName
154+
}
150155
Text(
151-
text = "'${primaryEmotion.code.displayName}'",
156+
text = "'$emotionDisplayName'",
152157
color = primaryEmotion.code.primaryEmotionColor,
153158
style = ReedTheme.typography.label1SemiBold,
154159
)
@@ -251,13 +256,13 @@ private fun CollectedSeedsCollapsedPreview() {
251256
ReedTheme {
252257
CollectedSeeds(
253258
seedsStats = persistentListOf(
254-
EmotionModel(EmotionCode.WARMTH, 4),
259+
EmotionModel(EmotionCode.WARMTH, 2),
255260
EmotionModel(EmotionCode.JOY, 2),
256-
EmotionModel(EmotionCode.SADNESS, 2),
261+
EmotionModel(EmotionCode.SADNESS, 4),
257262
EmotionModel(EmotionCode.INSIGHT, 2),
258263
EmotionModel(EmotionCode.OTHER, 2),
259264
),
260-
representativeEmotion = PrimaryEmotionModel(EmotionCode.WARMTH, "따뜻함"),
265+
representativeEmotion = PrimaryEmotionModel(EmotionCode.SADNESS, "슬픔"),
261266
isStatsExpanded = false,
262267
onToggleClick = {},
263268
)
@@ -271,12 +276,12 @@ private fun CollectedSeedsExpandedPreview() {
271276
CollectedSeeds(
272277
seedsStats = persistentListOf(
273278
EmotionModel(EmotionCode.WARMTH, 2),
274-
EmotionModel(EmotionCode.JOY, 4),
279+
EmotionModel(EmotionCode.JOY, 2),
275280
EmotionModel(EmotionCode.SADNESS, 2),
276281
EmotionModel(EmotionCode.INSIGHT, 2),
277-
EmotionModel(EmotionCode.OTHER, 2),
282+
EmotionModel(EmotionCode.OTHER, 4),
278283
),
279-
representativeEmotion = PrimaryEmotionModel(EmotionCode.JOY, "즐거움"),
284+
representativeEmotion = PrimaryEmotionModel(EmotionCode.OTHER, "기타"),
280285
isStatsExpanded = true,
281286
onToggleClick = {},
282287
)

feature/detail/src/main/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<string name="record_collection">내 기록 모음</string>
1010
<string name="collected_seed_title">내가 모은 씨앗</string>
1111
<string name="collected_seed_emotion_description">감정을 많이 느꼈어요</string>
12-
<string name="collected_seed_other_emotion_description">감정으로 문장만 기록했어요</string>
12+
<string name="collected_seed_other_emotion_name">여러</string>
13+
<string name="collected_seed_other_emotion_description">감정을 느꼈어요</string>
1314
<string name="records_collection_empty">첫 기록을 남겨 보세요!\n나만의 아카이브를 만들 수 있어요.</string>
1415
<string name="register_book_record">독서 기록 추가</string>
1516
<string name="record_detail_share">공유하기</string>

0 commit comments

Comments
 (0)