Skip to content

Commit dfc29cf

Browse files
committed
FIX: 목표 재설정하기 선택시 상단 뒤로가기 버튼이 표시되지 않는 부분 수정
1 parent 1a27496 commit dfc29cf

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/component/block/BitnagilProgressTopBar.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ fun BitnagilProgressTopBar(
2020
progress: Float,
2121
onBackClick: () -> Unit,
2222
modifier: Modifier = Modifier,
23+
showProgress: Boolean,
2324
) {
2425
Row(
2526
modifier = modifier
@@ -35,10 +36,11 @@ fun BitnagilProgressTopBar(
3536
tint = BitnagilTheme.colors.coolGray10,
3637
)
3738

38-
BitnagilProgressBar(
39-
progress = progress,
40-
modifier = Modifier,
41-
)
39+
if (showProgress)
40+
BitnagilProgressBar(
41+
progress = progress,
42+
modifier = Modifier,
43+
)
4244
}
4345
}
4446

@@ -48,5 +50,6 @@ private fun BitnagilProgressTopBarPreview() {
4850
BitnagilProgressTopBar(
4951
progress = 1f,
5052
onBackClick = {},
53+
showProgress = true
5154
)
5255
}

presentation/src/main/java/com/threegap/bitnagil/presentation/onboarding/OnBoardingScreen.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@ private fun OnBoardingScreen(
7878
.background(BitnagilTheme.colors.white)
7979
.statusBarsPadding(),
8080
) {
81-
if (state.showProgress)
81+
if (!state.hideToolbar)
8282
BitnagilProgressTopBar(
8383
modifier = Modifier,
8484
onBackClick = onClickPreviousInSelectOnBoarding,
8585
progress = state.progress,
86+
showProgress = state.showProgress
8687
)
8788

8889
when (state) {

presentation/src/main/java/com/threegap/bitnagil/presentation/onboarding/model/mvi/OnBoardingState.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ sealed class OnBoardingState(val progress: Float) : Parcelable, MviState {
2323
) : OnBoardingState(progress = currentStep.toFloat() / totalStep.toFloat())
2424

2525
val showProgress: Boolean get() = progress > 0
26+
val hideToolbar: Boolean get() = (this is Idle && onBoardingSetType == OnBoardingSetType.NEW && progress <= 0)
2627
}

0 commit comments

Comments
 (0)