mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Rename TelegramCore source folder
This commit is contained in:
23
submodules/TelegramCore/Sources/TelegramMediaMap.swift
Normal file
23
submodules/TelegramCore/Sources/TelegramMediaMap.swift
Normal file
@@ -0,0 +1,23 @@
|
||||
import Foundation
|
||||
#if os(macOS)
|
||||
import PostboxMac
|
||||
import TelegramApiMac
|
||||
#else
|
||||
import Postbox
|
||||
import TelegramApi
|
||||
#endif
|
||||
|
||||
import SyncCore
|
||||
|
||||
func telegramMediaMapFromApiGeoPoint(_ geo: Api.GeoPoint, title: String?, address: String?, provider: String?, venueId: String?, venueType: String?, liveBroadcastingTimeout: Int32?) -> TelegramMediaMap {
|
||||
var venue: MapVenue?
|
||||
if let title = title {
|
||||
venue = MapVenue(title: title, address: address, provider: provider, id: venueId, type: venueType)
|
||||
}
|
||||
switch geo {
|
||||
case let .geoPoint(long, lat, _):
|
||||
return TelegramMediaMap(latitude: lat, longitude: long, geoPlace: nil, venue: venue, liveBroadcastingTimeout: liveBroadcastingTimeout)
|
||||
case .geoPointEmpty:
|
||||
return TelegramMediaMap(latitude: 0.0, longitude: 0.0, geoPlace: nil, venue: venue, liveBroadcastingTimeout: liveBroadcastingTimeout)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user