Skip to content

Commit

Permalink
chore/#241 중간 커밋
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaybei committed Jul 19, 2024
1 parent 1020206 commit 9266a38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion KkuMulKum/Source/Home/ViewController/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,22 @@ class HomeViewController: BaseViewController {
view.backgroundColor = .maincolor
register()

updateUI()

updateUserInfo()
updateNearestPromise()
updateUpcomingPromise()
updateUI()
}

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.isNavigationBarHidden = true

// updateUserInfo()
// updateNearestPromise()
// updateUpcomingPromise()
// updateUI()

viewModel.requestLoginUser()
viewModel.requestNearestPromise()
viewModel.requestUpcomingPromise()
Expand Down Expand Up @@ -397,6 +403,7 @@ private extension HomeViewController {
setProgressButton(rootView.todayPromiseView.moveButton)
setEnableButton(rootView.todayPromiseView.arriveButton)

rootView.todayPromiseView.prepareButton.isEnabled = false
rootView.todayPromiseView.moveButton.isEnabled = false
rootView.todayPromiseView.arriveButton.isEnabled = true

Expand Down Expand Up @@ -425,6 +432,7 @@ private extension HomeViewController {
setCompleteButton(rootView.todayPromiseView.moveButton)
setCompleteButton(rootView.todayPromiseView.arriveButton)

rootView.todayPromiseView.prepareButton.isEnabled = false
rootView.todayPromiseView.moveButton.isEnabled = false
rootView.todayPromiseView.arriveButton.isEnabled = false

Expand Down
6 changes: 3 additions & 3 deletions KkuMulKum/Source/Home/ViewModel/HomeViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ final class HomeViewModel {
return
}
isPreapreSucceedToSave.value = responseBody.success
// updateState(newState: .prepare)
currentState.value = .prepare
} catch {
print(">>> \(error.localizedDescription) : \(#function)")
}
Expand All @@ -146,7 +146,7 @@ final class HomeViewModel {
return
}
isMoveSucceedToSave.value = responseBody.success
// updateState(newState: .move)
currentState.value = .move
} catch {
print(">>> \(error.localizedDescription) : \(#function)")
}
Expand All @@ -164,7 +164,7 @@ final class HomeViewModel {
return
}
isArriveSucceedToSave.value = responseBody.success
// updateState(newState: .arrive)
currentState.value = .arrive
} catch {
print(">>> \(error.localizedDescription) : \(#function)")
}
Expand Down

0 comments on commit 9266a38

Please sign in to comment.