Skip to content

Commit

Permalink
[Feat] #317 - 삭제된 식당 썸네일이면 전체 식당 바텀 시트 올라오게 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
EunsuSeo01 committed Dec 25, 2024
1 parent 898fa7d commit 367d877
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Hankkijogbo/Hankkijogbo/Present/Home/View/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ final class HomeViewController: BaseViewController, NetworkResultDelegate {
private func bindViewModel() {
viewModel.hankkiListsDidChange = { [weak self] data in
guard let self = self else { return }

self.viewModel.checkThumbnailHankkiValidation()

DispatchQueue.main.async {
self.rootView.bottomSheetView.data = data
self.rootView.bottomSheetView.updateTotalListCount(count: data.count)
Expand All @@ -124,6 +127,10 @@ final class HomeViewController: BaseViewController, NetworkResultDelegate {
primaryButtonText: StringLiterals.Alert.check)
}

viewModel.showHankkiListBottomSheet = {
self.showHankkiListBottomSheet()
}

viewModel.getCategoryFilterAPI { [weak self] success in
if success {
DispatchQueue.main.async {
Expand Down Expand Up @@ -245,12 +252,16 @@ private extension HomeViewController {
}
}
}

func showHankkiListBottomSheet() {
self.rootView.bottomSheetView.viewLayoutIfNeededWithDownAnimation()
self.hideMarkerInfoCard()
}
}

extension HomeViewController: NMFMapViewTouchDelegate, NMFMapViewCameraDelegate {
func mapView(_ mapView: NMFMapView, didTapMap latlng: NMGLatLng, point: CGPoint) {
self.rootView.bottomSheetView.viewLayoutIfNeededWithDownAnimation()
self.hideMarkerInfoCard()
showHankkiListBottomSheet()
}
}

Expand Down

0 comments on commit 367d877

Please sign in to comment.