Skip to content

Commit 11ad16a

Browse files
committed
FIX: 목표 재설정시 온보딩 선택 첫 페이지에서 뒤로 돌아가면 온보딩 소개 페이지가 표시되는 문제 수정
1 parent 5b71f6f commit 11ad16a

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,19 @@ class OnBoardingViewModel @AssistedInject constructor(
202202
}
203203

204204
if (currentState.currentStep == 1) {
205-
return currentState.copy(
206-
currentStep = 0,
207-
currentOnBoardingPageInfo = OnBoardingPageInfo.Intro,
208-
nextButtonEnable = true,
209-
)
205+
return if (currentState.onBoardingSetType == OnBoardingSetType.RESET && existedOnBoardingAbstract != null) {
206+
currentState.copy(
207+
currentStep = 0,
208+
currentOnBoardingPageInfo = existedOnBoardingAbstract!!,
209+
nextButtonEnable = true,
210+
)
211+
} else {
212+
currentState.copy(
213+
currentStep = 0,
214+
currentOnBoardingPageInfo = OnBoardingPageInfo.Intro,
215+
nextButtonEnable = true,
216+
)
217+
}
210218
}
211219

212220
val isSelectOnBoardingStep = currentState.currentStep <= selectOnBoardingPageInfos.size

0 commit comments

Comments
 (0)