mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-24 04:00:45 +00:00
Added Moovit to available Open In options
This commit is contained in:
parent
f5e2d58a84
commit
d28e6ebe57
@ -228,9 +228,7 @@
|
||||
<false/>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>dbapi-3</string>
|
||||
<string>instagram</string>
|
||||
<string>googledrive</string>
|
||||
<string>comgooglemaps-x-callback</string>
|
||||
<string>foursquare</string>
|
||||
<string>here-location</string>
|
||||
@ -257,6 +255,7 @@
|
||||
<string>opera-https</string>
|
||||
<string>firefox-focus</string>
|
||||
<string>ddgQuickLink</string>
|
||||
<string>moovit</string>
|
||||
</array>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
|
@ -192,6 +192,20 @@ private func allOpenInOptions(context: AccountContext, item: OpenInItem) -> [Ope
|
||||
return .openUrl(url: "yandexnavi://build_route_on_map?lat_to=\(lat)&lon_to=\(lon)")
|
||||
}))
|
||||
}
|
||||
|
||||
options.append(OpenInOption(application: .other(title: "Moovit", identifier: 498477945, scheme: "moovit", store: nil), action: {
|
||||
if withDirections {
|
||||
let destName: String
|
||||
if let title = location.venue?.title.addingPercentEncoding(withAllowedCharacters: .urlQueryValueAllowed), title.count > 0 {
|
||||
destName = title
|
||||
} else {
|
||||
destName = ""
|
||||
}
|
||||
return .openUrl(url: "moovit://directions?dest_lat=\(lat)&dest_lon=\(lon)&dest_name=\(destName)&partner_id=Telegram")
|
||||
} else {
|
||||
return .openUrl(url: "moovit://nearby?lat=\(lat)&lon=\(lon)&partner_id=Telegram")
|
||||
}
|
||||
}))
|
||||
|
||||
if !withDirections {
|
||||
options.append(OpenInOption(application: .other(title: "HERE Maps", identifier: 955837609, scheme: "here-location", store: nil), action: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user