Skip to content

Commit

Permalink
[refactor] #290 data null일경우 블록 탈출하고 리턴하도록 처리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sxunea committed May 18, 2024
1 parent 0c20bb7 commit 894bf58
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,12 @@ class MyPageFragment : BindingFragment<FragmentMyPageBinding>(R.layout.fragment_
is UiState.Success -> {
dismissLoadingProgressBar()
binding.root.post {
state.data?.let {
updateUserInfo(it)
setUpUserGoalByLevel(it)
setUpUserDataByGoal(it)
animate2weeksSaveGraph(it.amountSavedTwoWeeks)
animate2weeksSpendGraph(it.amountSpentTwoWeeks)
}
val data = state.data ?: return@post
updateUserInfo(data)
setUpUserGoalByLevel(data)
setUpUserDataByGoal(data)
animate2weeksSaveGraph(data.amountSavedTwoWeeks)
animate2weeksSpendGraph(data.amountSpentTwoWeeks)
}
}

Expand Down

0 comments on commit 894bf58

Please sign in to comment.