mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-08 05:55:13 +00:00
Merge branch 'master' of github.com:peter-iakovlev/TelegramUI
This commit is contained in:
@@ -229,7 +229,7 @@ func legacyLocationController(message: Message, mapMedia: TelegramMediaMap, acco
|
||||
strongLegacyController.present(ShareController(account: account, subject: .mapMedia(map), externalShare: true), in: .window(.root), with: nil)
|
||||
})
|
||||
|
||||
strongLegacyController.present(OpenInActionSheetController(postbox: account.postbox, applicationContext: account.telegramApplicationContext, theme: presentationData.theme, strings: presentationData.strings, item: .location(map, withDirections: directions), additionalAction: shareAction, openUrl: openUrl), in: .window(.root), with: nil)
|
||||
strongLegacyController.present(OpenInActionSheetController(postbox: account.postbox, applicationContext: account.telegramApplicationContext, theme: presentationData.theme, strings: presentationData.strings, item: .location(map, withDirections: directions), additionalAction: !directions ? shareAction : nil, openUrl: openUrl), in: .window(.root), with: nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,9 +113,9 @@ private func allOpenInOptions(applicationContext: TelegramApplicationContext, it
|
||||
options.append(OpenInOption(application: .other(title: "Google Maps", identifier: 585027354, scheme: "comgooglemaps-x-callback"), action: {
|
||||
let coordinates = "\(lat),\(lon)"
|
||||
if withDirections {
|
||||
return .openUrl("comgooglemaps-x-callback://?daddr=\(coordinates)&directionsmode=driving&x-success=telegram://?resume=true&&x-source=Telegram")
|
||||
return .openUrl("comgooglemaps-x-callback://?daddr=\(coordinates)&directionsmode=driving&x-success=telegram://?resume=true&x-source=Telegram")
|
||||
} else {
|
||||
return .openUrl("comgooglemaps-x-callback://?center=\(coordinates)&q=\(coordinates)&x-success=telegram://?resume=true&&x-source=Telegram")
|
||||
return .openUrl("comgooglemaps-x-callback://?center=\(coordinates)&q=\(coordinates)&x-success=telegram://?resume=true&x-source=Telegram")
|
||||
}
|
||||
}))
|
||||
|
||||
@@ -123,7 +123,7 @@ private func allOpenInOptions(applicationContext: TelegramApplicationContext, it
|
||||
if withDirections {
|
||||
return .openUrl("yandexmaps://build_route_on_map?lat_to=\(lat)&lon_to=\(lon)")
|
||||
} else {
|
||||
return .openUrl("yandexmaps://maps.yandex.ru/?pt=\(lat),\(lon)&z=16")
|
||||
return .openUrl("yandexmaps://maps.yandex.ru/?pt=\(lon),\(lat)&z=16")
|
||||
}
|
||||
}))
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ public func openExternalUrl(account: Account, url: String, presentationData: Pre
|
||||
if let parsed = parsedUrlValue, parsed.scheme == nil {
|
||||
parsedUrlValue = URL(string: "https://" + parsed.absoluteString)
|
||||
}
|
||||
if let parsed = parsedUrlValue, parsed.host == nil, let scheme = parsed.scheme, !scheme.isEmpty {
|
||||
parsedUrlValue = URL(string: "https://" + parsed.absoluteString)
|
||||
}
|
||||
// if let parsed = parsedUrlValue, parsed.host == nil, let scheme = parsed.scheme, !scheme.isEmpty {
|
||||
// parsedUrlValue = URL(string: "https://" + parsed.absoluteString)
|
||||
// }
|
||||
|
||||
guard let parsedUrl = parsedUrlValue else {
|
||||
return
|
||||
|
||||
@@ -527,13 +527,13 @@ static void TGDispatchOnMainThread(dispatch_block_t block) {
|
||||
[EAGLContext setCurrentContext:_glkView.context];
|
||||
|
||||
|
||||
set_telegram_textures(setup_texture(@"telegram_sphere.png"), setup_texture(@"telegram_plane.png"));
|
||||
set_telegram_textures(setup_texture(@"telegram_sphere.png"), setup_texture(@"telegram_plane1.png"));
|
||||
|
||||
set_ic_textures(setup_texture(@"ic_bubble_dot.png"), setup_texture(@"ic_bubble.png"), setup_texture(@"ic_cam_lens.png"), setup_texture(@"ic_cam.png"), setup_texture(@"ic_pencil.png"), setup_texture(@"ic_pin.png"), setup_texture(@"ic_smile_eye.png"), setup_texture(@"ic_smile.png"), setup_texture(@"ic_videocam.png"));
|
||||
|
||||
set_fast_textures(setup_texture(@"fast_body.png"), setup_texture(@"fast_spiral.png"), setup_texture(@"fast_arrow.png"), setup_texture(@"fast_arrow_shadow.png"));
|
||||
|
||||
set_free_textures(setup_texture(@"knot_up.png"), setup_texture(@"knot_down.png"));
|
||||
set_free_textures(setup_texture(@"knot_up1.png"), setup_texture(@"knot_down.png"));
|
||||
|
||||
set_powerful_textures(setup_texture(@"powerful_mask.png"), setup_texture(@"powerful_star.png"), setup_texture(@"powerful_infinity.png"), setup_texture(@"powerful_infinity_white.png"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user