mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Initial invite requests implementation
This commit is contained in:
@@ -54,12 +54,12 @@ public final class OpenInActionSheetController: ActionSheetController {
|
||||
switch action {
|
||||
case let .openUrl(url):
|
||||
openUrl(url)
|
||||
case let .openLocation(latitude, longitude, withDirections):
|
||||
case let .openLocation(latitude, longitude, directions):
|
||||
let placemark = MKPlacemark(coordinate: CLLocationCoordinate2DMake(latitude, longitude), addressDictionary: [:])
|
||||
let mapItem = MKMapItem(placemark: placemark)
|
||||
|
||||
if withDirections {
|
||||
let options = [ MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving ]
|
||||
if let directions = directions {
|
||||
let options = [ MKLaunchOptionsDirectionsModeKey: directions.launchOptions ]
|
||||
MKMapItem.openMaps(with: [MKMapItem.forCurrentLocation(), mapItem], launchOptions: options)
|
||||
} else {
|
||||
mapItem.openInMaps(launchOptions: nil)
|
||||
|
||||
Reference in New Issue
Block a user