File tree Expand file tree Collapse file tree 3 files changed +17
-15
lines changed
Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ GMSIndoorDisplayDelegate {
278278 disableActions: false ,
279279 duration: durationMs / 1000.0
280280 ) {
281- mapView? . animate ( to: camera)
281+ self . mapView? . animate ( to: camera)
282282 }
283283 } else {
284284 let update = GMSCameraUpdate . setCamera ( camera)
@@ -318,7 +318,7 @@ GMSIndoorDisplayDelegate {
318318 disableActions: false ,
319319 duration: durationMs / 1000.0
320320 ) {
321- mapView? . animate ( with: update)
321+ self . mapView? . animate ( with: update)
322322 }
323323 } else {
324324 mapView? . moveCamera ( update)
Original file line number Diff line number Diff line change 11import QuartzCore
22
3- @inline ( __always)
3+ @MainActor @ inline ( __always)
44func withCATransaction(
55 disableActions: Bool = true ,
66 duration: CFTimeInterval ? = nil ,
77 timingFunction: CAMediaTimingFunction ? = nil ,
88 completion: ( ( ) -> Void ) ? = nil ,
9- _ body: ( ) -> Void
9+ _ body: @escaping @ MainActor ( ) -> Void
1010) {
11- CATransaction . begin ( )
11+ onMain {
12+ CATransaction . begin ( )
1213
13- CATransaction . setDisableActions ( disableActions)
14- duration. map { CATransaction . setAnimationDuration ( $0) }
15- timingFunction. map { CATransaction . setAnimationTimingFunction ( $0) }
16- completion. map { CATransaction . setCompletionBlock ( $0) }
14+ CATransaction . setDisableActions ( disableActions)
15+ duration. map { CATransaction . setAnimationDuration ( $0) }
16+ timingFunction. map { CATransaction . setAnimationTimingFunction ( $0) }
17+ completion. map { CATransaction . setCompletionBlock ( $0) }
1718
18- body ( )
19- CATransaction . commit ( )
19+ body ( )
20+ CATransaction . commit ( )
21+ }
2022}
2123
2224@MainActor @inline ( __always)
Original file line number Diff line number Diff line change @@ -132,19 +132,19 @@ final class RNGoogleMapsPlusView: HybridRNGoogleMapsPlusViewSpec {
132132 withCATransaction ( disableActions: true ) {
133133
134134 removed. forEach {
135- impl. removeMarker ( id: $0)
136- markerBuilder. cancelIconTask ( $0)
135+ self . impl. removeMarker ( id: $0)
136+ self . markerBuilder. cancelIconTask ( $0)
137137 }
138138
139139 for (id, next) in nextById {
140140 if let prev = prevById [ id] {
141141 if !prev. markerEquals ( next) {
142- impl. updateMarker ( id: id) { m in
142+ self . impl. updateMarker ( id: id) { m in
143143 self . markerBuilder. update ( prev, next, m)
144144 }
145145 }
146146 } else {
147- markerBuilder. buildIconAsync ( next. id, next) { icon in
147+ self . markerBuilder. buildIconAsync ( next. id, next) { icon in
148148 let marker = self . markerBuilder. build ( next, icon: icon)
149149 self . impl. addMarker ( id: id, marker: marker)
150150 }
You can’t perform that action at this time.
0 commit comments