Skip to content

Commit 3ea8eb8

Browse files
authored
Merge pull request #122 from YAPP-Github/qa/#119-v2
[Qa/#119] 빛나길 2.0.0 버전 자체 QA 사항을 반영합니다.
2 parents 4a845fc + dcba39b commit 3ea8eb8

File tree

12 files changed

+33
-2
lines changed

12 files changed

+33
-2
lines changed

app/src/main/java/com/threegap/bitnagil/MainNavHost.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ fun MainNavHost(
8080
)
8181
},
8282
navigateToOnBoarding = {
83-
navigator.navController.navigate(Route.OnBoarding())
83+
navigator.navController.navigate(Route.OnBoarding()) {
84+
popUpTo(0) { inclusive = true }
85+
}
8486
},
8587
navigateToBack = {
8688
if (navigator.navController.previousBackStackEntry != null) {

core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/component/atom/BitnagilSelectButton.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import androidx.compose.ui.semantics.Role
2929
import androidx.compose.ui.semantics.role
3030
import androidx.compose.ui.semantics.semantics
3131
import androidx.compose.ui.text.TextStyle
32+
import androidx.compose.ui.text.style.LineHeightStyle
3233
import androidx.compose.ui.tooling.preview.Preview
3334
import androidx.compose.ui.unit.dp
3435
import com.threegap.bitnagil.designsystem.BitnagilTheme
@@ -93,7 +94,12 @@ fun BitnagilSelectButton(
9394
Text(
9495
text = title,
9596
color = contentColor,
96-
style = titleTextStyle,
97+
style = titleTextStyle.copy(
98+
lineHeightStyle = LineHeightStyle(
99+
alignment = LineHeightStyle.Alignment.Center,
100+
trim = LineHeightStyle.Trim.None,
101+
),
102+
),
97103
)
98104

99105
description?.let {
30.4 KB
Loading
19.1 KB
Loading
44.4 KB
Loading
73.6 KB
Loading
109 KB
Loading

presentation/src/main/java/com/threegap/bitnagil/presentation/guide/model/GuideType.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ enum class GuideType(
1313
description = "오늘 느끼는 감정을 선택하면, 그 기분에 맞춰 추천 루틴을 확인할 수 있어요.",
1414
image = R.drawable.img_register_guide,
1515
),
16+
HOME_LIST(
17+
title = "홈에서 더보기란?",
18+
description = "루틴리스트에서 세부 항목(세부루틴, 반복, 기간, 시간)을\n확인하고, 필요 시 수정하거나 삭제할 수 있어요.",
19+
image = R.drawable.img_list_guide,
20+
),
1621
RECOMMEND(
1722
title = "맞춤 추천 루틴이란?",
1823
description = "처음 설정한 목표에 맞춰 루틴을 추천받을 수 있으며,\n필요할 때 언제든 수정할 수 있어요.",

presentation/src/main/java/com/threegap/bitnagil/presentation/recommendroutine/RecommendRoutineViewModel.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.threegap.bitnagil.presentation.recommendroutine
22

33
import androidx.lifecycle.SavedStateHandle
44
import androidx.lifecycle.viewModelScope
5+
import com.threegap.bitnagil.domain.emotion.usecase.GetEmotionChangeEventFlowUseCase
56
import com.threegap.bitnagil.domain.recommendroutine.model.RecommendCategory
67
import com.threegap.bitnagil.domain.recommendroutine.model.RecommendLevel
78
import com.threegap.bitnagil.domain.recommendroutine.usecase.FetchRecommendRoutinesUseCase
@@ -21,13 +22,15 @@ import javax.inject.Inject
2122
class RecommendRoutineViewModel @Inject constructor(
2223
savedStateHandle: SavedStateHandle,
2324
private val fetchRecommendRoutinesUseCase: FetchRecommendRoutinesUseCase,
25+
private val getEmotionChangeEventFlowUseCase: GetEmotionChangeEventFlowUseCase,
2426
) : MviViewModel<RecommendRoutineState, RecommendRoutineSideEffect, RecommendRoutineIntent>(
2527
initState = RecommendRoutineState(),
2628
savedStateHandle = savedStateHandle,
2729
) {
2830

2931
init {
3032
loadRecommendRoutines()
33+
observeEmotionChangeEvent()
3134
}
3235

3336
private var recommendRoutines: RecommendRoutinesUiModel = RecommendRoutinesUiModel()
@@ -90,6 +93,14 @@ class RecommendRoutineViewModel @Inject constructor(
9093
}
9194
}
9295

96+
private fun observeEmotionChangeEvent() {
97+
viewModelScope.launch {
98+
getEmotionChangeEventFlowUseCase().collect {
99+
loadRecommendRoutines()
100+
}
101+
}
102+
}
103+
93104
private fun loadRecommendRoutines() {
94105
sendIntent(RecommendRoutineIntent.UpdateLoading(true))
95106
viewModelScope.launch {

presentation/src/main/java/com/threegap/bitnagil/presentation/writeroutine/WriteRoutineScreen.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import com.threegap.bitnagil.designsystem.R
2929
import com.threegap.bitnagil.designsystem.component.atom.BitnagilTextButton
3030
import com.threegap.bitnagil.designsystem.component.block.BitnagilTopBar
3131
import com.threegap.bitnagil.presentation.common.flow.collectAsEffect
32+
import com.threegap.bitnagil.presentation.common.toast.GlobalBitnagilToast
3233
import com.threegap.bitnagil.presentation.writeroutine.component.atom.namefield.NameField
3334
import com.threegap.bitnagil.presentation.writeroutine.component.atom.selectcell.SelectCell
3435
import com.threegap.bitnagil.presentation.writeroutine.component.atom.writeroutinebutton.WriteRoutineButton
@@ -57,6 +58,10 @@ fun WriteRoutineScreenContainer(
5758
WriteRoutineSideEffect.MoveToPreviousScreen -> {
5859
navigateToBack()
5960
}
61+
62+
is WriteRoutineSideEffect.ShowToast -> {
63+
GlobalBitnagilToast.showCheck(sideEffect.message)
64+
}
6065
}
6166
}
6267

0 commit comments

Comments
 (0)