Add 2GIS as open-in option

This commit is contained in:
Ilya Laktyushin 2021-06-14 23:24:20 +03:00
parent bda08452d2
commit e91e655b04

View File

@ -239,6 +239,15 @@ private func allOpenInOptions(context: AccountContext, item: OpenInItem) -> [Ope
}))
}
options.append(OpenInOption(identifier: "2gis", application: .other(title: "2GIS", identifier: 481627348, scheme: "dgis", store: nil), action: {
let coordinates = "\(lon),\(lat)"
if withDirections {
return .openUrl(url: "dgis://2gis.ru/routeSearch/to/\(coordinates)/go")
} else {
return .openUrl(url: "dgis://2gis.ru/geo/\(coordinates)")
}
}))
options.append(OpenInOption(identifier: "moovit", application: .other(title: "Moovit", identifier: 498477945, scheme: "moovit", store: nil), action: {
if withDirections {
let destName: String