Skip to content

Commit

Permalink
Fix : 네트워크 오류로 인한 자동 로그인 실패 시 홈 화면이 아닌 로그인 화면으로 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
DongChyeon committed May 31, 2024
1 parent ac1d10c commit bd68d44
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@ class SplashViewModel @Inject constructor(
getConnections()
navigateToMain()
} else {
naviagateToLogin()
navigateToLogin()
}
}

is ApiResult.ApiError -> {
naviagateToLogin()
navigateToLogin()
}

is ApiResult.NetworkError -> {
postEffect(SplashContract.Effect.ShowSnackBar("네트워크 오류가 발생했습니다."))
navigateToMain()
navigateToLogin()
}
}
}
Expand Down Expand Up @@ -140,7 +140,7 @@ class SplashViewModel @Inject constructor(
})
}

private fun naviagateToLogin() {
private fun navigateToLogin() {
postEffect(SplashContract.Effect.NavigateTo(AuthDestinations.Login.ROUTE) {
popUpTo(AuthDestinations.SPLASH) { inclusive = true }
})
Expand Down

0 comments on commit bd68d44

Please sign in to comment.