5858: Add pin drop feature

This commit is contained in:
MaximeE
2022-03-30 11:36:31 +02:00
parent c1e68be017
commit 3d58e94e6b
12 changed files with 126 additions and 10 deletions
@@ -91,6 +91,15 @@ class LocationSharingViewModel: LocationSharingViewModelType, LocationSharingVie
}
completion?(.share(latitude: location.latitude, longitude: location.longitude))
case .sharePinLocation:
guard let pinLocation = state.bindings.pinLocation else {
processError(.failedLocatingUser)
return
}
completion?(.share(latitude: pinLocation.latitude, longitude: pinLocation.longitude))
case .goToUserLocation:
state.bindings.pinLocation = nil
}
}