Skip to content

Commit

Permalink
Merge pull request #299 from boostcampwm2023/iOS/task/HomeButton-Bug-Fix
Browse files Browse the repository at this point in the history
[iOS] Home ๊ด€๋ จ Bug Fix ์ˆ˜์ •
  • Loading branch information
SwiftyJunnos authored Dec 11, 2023
2 parents 7cfc5e1 + 8267829 commit 44d9fd8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public final class HomeViewController: HomeBottomSheetViewController {
.receive(on: DispatchQueue.main)
.sink { [weak self] _ in
self?.contentViewController.clearOverlays()
self?.contentViewController.clearAnnotations()
}
.store(in: &self.cancellables)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,18 @@ public final class HomeViewModel {
MSLogger.make(category: .home).debug("Start ๋ฒ„ํŠผ ํƒญ: \(coordinate)")
#endif
self.startJourney(at: coordinate)
self.state.isRefreshButtonHidden.send(true)
case .refreshButtonDidTap(visibleCoordinates: (let minCoordinate, let maxCoordinate)):
self.state.isRefreshButtonHidden.send(true)
self.fetchJourneys(minCoordinate: minCoordinate, maxCoordinate: maxCoordinate)
case .backButtonDidTap:
self.state.isRecording.send(false)
self.state.isRefreshButtonHidden.send(false)
self.state.overlaysShouldBeCleared.send(true)
case .mapViewDidChange:
self.state.isRefreshButtonHidden.send(false)
if self.state.isRecording.value == false {
self.state.isRefreshButtonHidden.send(false)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,11 @@ public final class MapViewController: UIViewController {
CLLocationCoordinate2D(latitude: $0.latitude,
longitude: $0.longitude)
}
await self.drawPolylineToMap(using: coordinates)
let spotCoordinates = journey.spots.map {
CLLocationCoordinate2D(latitude: $0.coordinate.latitude,
longitude: $0.coordinate.longitude)
}
await self.drawPolylineToMap(using: coordinates+spotCoordinates)
}
}
}
Expand Down

0 comments on commit 44d9fd8

Please sign in to comment.