Skip to content

Commit

Permalink
#79 [Feat] 유저 위치 업데이트 store와 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
soletree committed Aug 15, 2024
1 parent 2d628d0 commit d008d30
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@

import CoreLocation
import os.log
import ComposableArchitecture

final class LocationManager: CLLocationManager {
private(set) var locations: [CLLocation] = []
private var store: StoreOf<MapFeature>

override init() {
init(store: StoreOf<MapFeature>) {
self.store = store
super.init()
self.delegate = self
}
Expand Down Expand Up @@ -42,7 +44,7 @@ extension LocationManager: CLLocationManagerDelegate {
_ manager: CLLocationManager,
didUpdateLocations locations: [CLLocation]
) {
self.locations += locations
store.send(.updatingLocations(locations: locations))
}
}

Expand Down

0 comments on commit d008d30

Please sign in to comment.