Skip to content

Commit

Permalink
Add explicit use of self (#2020)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjleonard37 authored Feb 7, 2024
1 parent fc950cc commit c6c0cf5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Sources/MapboxMaps/Gestures/MapContentGestureManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ final class MapContentGestureManager: MapContentGestureManagerProtocol {
guard let self else { return }

for queriedFeature in queriedFeatures {
if !handle(using: { manager in manager.handleTap }, queriedFeature: queriedFeature, context: context) {
if !handle(subscribers: \.layerTapSubscribers, queriedFeature: queriedFeature, context: context) { continue }
if !self.handle(using: { manager in manager.handleTap }, queriedFeature: queriedFeature, context: context) {
if !self.handle(subscribers: \.layerTapSubscribers, queriedFeature: queriedFeature, context: context) { continue }
}
return
}

mapTapSignal.send(context)
self.mapTapSignal.send(context)
}
}

Expand All @@ -109,15 +109,15 @@ final class MapContentGestureManager: MapContentGestureManagerProtocol {
var isLongPressHandled = false

for queriedFeature in queriedFeatures {
if !handle(using: { manager in manager.handleLongPress }, queriedFeature: queriedFeature, context: context) {
if !handle(subscribers: \.layerLongPressSubscribers, queriedFeature: queriedFeature, context: context) { continue }
if !self.handle(using: { manager in manager.handleLongPress }, queriedFeature: queriedFeature, context: context) {
if !self.handle(subscribers: \.layerLongPressSubscribers, queriedFeature: queriedFeature, context: context) { continue }
}
isLongPressHandled = true
}

if !isLongPressHandled { mapLongPressSignal.send(context) }
if !isLongPressHandled { self.mapLongPressSignal.send(context) }

handeDragBegin(queriedFeatures: queriedFeatures, context: context)
self.handeDragBegin(queriedFeatures: queriedFeatures, context: context)
}

case .changed:
Expand Down

0 comments on commit c6c0cf5

Please sign in to comment.