Skip to content

Commit

Permalink
Merge branch 'develop' into fix/#289
Browse files Browse the repository at this point in the history
  • Loading branch information
EunsuSeo01 committed Nov 15, 2024
2 parents f14d99f + 0133a00 commit f295b3a
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions Hankkijogbo/Hankkijogbo/Present/Home/View/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -198,26 +198,12 @@ extension HomeViewController {
}

private extension HomeViewController {
func loadInitialData() {
universityId = UserDefaults.standard.getUniversity()?.id
viewModel.getHankkiListAPI(universityId: universityId, storeCategory: "", priceCategory: "", sortOption: "") { [weak self] success in
let isEmpty = self?.viewModel.hankkiLists.isEmpty ?? true
self?.viewModel.onHankkiListFetchCompletion?(success, isEmpty)
}
viewModel.getHankkiPinAPI(universityId: universityId, storeCategory: "", priceCategory: "", sortOption: "", completion: { _ in })
}

func updateUniversityData() {
let universityId = UserDefaults.standard.getUniversity()?.id

viewModel.getHankkiListAPI(universityId: universityId, storeCategory: "", priceCategory: "", sortOption: "") { [weak self] success in
let isEmpty = self?.viewModel.hankkiLists.isEmpty ?? true
self?.viewModel.onHankkiListFetchCompletion?(success, isEmpty)
}
viewModel.getHankkiPinAPI(universityId: universityId, storeCategory: "", priceCategory: "", sortOption: "", completion: { _ in })
rootView.bottomSheetView.totalListCollectionView.reloadData()
viewModel.updateHankkiList()

// 대학 선택 후 홈화면 재진입 시 해당 대학교에 맞게 reset
rootView.bottomSheetView.totalListCollectionView.reloadData()
hideMarkerInfoCard()
rootView.bottomSheetView.viewLayoutIfNeededWithDownAnimation()
}
Expand Down

0 comments on commit f295b3a

Please sign in to comment.