Skip to content

Commit 75ceb3a

Browse files
committed
[FIX/#251] 운세 생성 실패 또는 Idle 상태일 때 홈으로 이동하도록 수정
1 parent e8ce1d1 commit 75ceb3a

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

feature/fortune/src/main/java/com/yapp/fortune/FortuneViewModel.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,8 @@ class FortuneViewModel @Inject constructor(
6464
)
6565
}
6666

67-
is FortuneCreateStatus.Failure -> {
68-
reduce { state.copy(isLoading = false) }
69-
}
70-
71-
is FortuneCreateStatus.Idle -> {
72-
reduce { state.copy(isLoading = false) }
67+
is FortuneCreateStatus.Failure, FortuneCreateStatus.Idle -> {
68+
postSideEffect(FortuneContract.SideEffect.NavigateToHome)
7369
}
7470
}
7571
}

0 commit comments

Comments
 (0)